Posts

Showing posts from January, 2014

screen - How to hide navigation bar in LibGDX? -

basically that's question. can hide navigation bar when run app in phone not have physical home buttons? way i'm running android 5 (i don't know if changes anything.) if know how please answer :) i know it's old question, finds way here, libgdx has easy way this. set field in androidlauncher class. config.useimmersivemode = true;

ios - Strategy to update UITableView by Parse query -

i have news feed application provides tons of news everyday. there uitableview showing news items in descending chronological order.it shows number (for example, 20 items) per page. when drag tableview, load more items (for example, next page). here comes problem, example: there totally 47 items, 1,2,3,... 47 the items per page 20. the first time shows 47,46,45,...28 it show 27 ... 8 when drag tableview load more data there more news items updated in server, example, 49,48 added the next time when call "loadmore" in client side. server return 9, 8, ... 1 instead of 7,6, ... 1 the query coding one:(the skip value of total number of items have) query.limit = 20 query.skip = skip query.findobjectsinbackgroundwithblock({ any method overcome issue? thanks add 1 more condition: query.wherekey("createdat",lessthanorequalto:lastdate) probably able solve problem. lastdate date of last record.

Android:Not able to write on textview of main activity when comming from different activity -

i created simple demo program in there start button.when click on start button on main (home) screen "hi all" appended text view.it works fine, when change activity selecting action bar menu , if again come on home screen selecting action bar home menu not show "hi " message when click on start button. package com.example.testdemo; import android.app.actionbar.layoutparams; import android.content.intent; import android.os.bundle; import android.app.actionbar; import android.app.activity; import android.text.method.scrollingmovementmethod; import android.view.gravity; import android.view.menu; import android.view.menuitem; import android.view.view; import android.widget.button; import android.widget.linearlayout; import android.widget.textview; public class mainactivity extends activity { private textview logarea; private textview log; @override protected void oncreate(bundle savedinstancestate) { super.oncrea...

how to use the output value in php -

i've got, html file clients can buy objects. there output line in order calculate sum of objects user buy : <output name="sum" for="i1 i2 i3 i4 i5 i16 i17 i18 i19 i20 i21 i22 i23 i24" id=sum></output> is there way, then, in php function, output ? : $somme=($_get['sum']); in order : $msg .= "total = $sum"; thank you; you can receive form values get/post methods as: get <?php if( $_get['sum'] ) { echo "total =".$_get['sum']; exit(); } ?> <form action="<?php $_php_self ?>" method="get"> <output name="sum" for="i1 i2 i3 i4 i5 i16 i17 i18 i19 i20 i21 i22 i23 i24" id=sum></output> </form> post <?php if( $_post['sum'] ) { echo "total =".$_post['sum']; exit(); } ?> <form action="<?php $_php_self ?>" method="posr...

android - OpenGL ES Startup -

i done 1:1 copy of ios app "mohrenjass" android. -> austria cardgame.. training example :) introduction activity, views, canvas, preference, apis, , more done opengl es sample developer page. read opengl have question it. there realy points in give me hard times. matrix, vertex, shader, fragment, projection, camera,... not not understand it, know "do when that" not enough searching errors in code... i think trying replicaisland code next, should start opengl first? i found fro opengl -> prefer because german http://wiki.delphigl.com/index.php/hauptseite (dont know if possible stand of knowledge) also found http://www.learnopengles.com/android-lesson-one-getting-started/ or skip , go replicaisland? learning doing way, punch in face... i wont try next simple 2d application. square go left/ right, jump above other square or somthing. learning reach someday target of realy create app :) i read unity, think not way should start that. possible if k...

loops - how to add a specific value to a column iteratively in python -

i have line have different columns , 1 particular column (column 2) want add values column (column 12 except 0) iteratively. able first 1 not rest of columns. here example of line a01 5729384 5730870 bra1000071 117 - 5729384 5730870 255,0,0 4 281,252,145,229 0,380,1030,1257 and here desired output a01 5729764 5730870 bra1000071 117 - 5729384 5730870 255,0,0 4 281,252,145,229 0,380,1030,1257 a01 5730794 5730870 bra1000071 117 - 5729384 5730870 255,0,0 4 281,252,145,229 0,380,1030,1257 a01 5732051 5730870 bra1000071 117 - 5729384 5730870 255,0,0 4 281,252,145,229 0,380,1030,1257 here psuedocode with open('velvet.test.bed') fh_in: line in fh_in: line = line.strip().split() x1 = line[11].split(',') print x1 j in x1: print j if j!= "0": next y1 = int(line[1]) + i...

php - mysql_real_escape_string won't allow me to login -

i'm using mysql_real_escape_string() escape logins such 1' or '1' = '1 , however, when escape cannot login - triggers error of "please enter valid username , password". if remove function , use trim() works fine doesn't escape sql injection obviously. //$name = trim($_post['adminname']); //$pswd = trim($_post['pswd']); $name = mysql_real_escape_string($_post['adminname']); $pswd = mysql_real_escape_string($_post['pswd']); $sql_re=$db->query("select admin_id,name admin name ='".$name."' , password = '".$pswd."'"); //$db->result(); // loads results list of arrays if($db->row() > 0){ $_session['adminname'] = "admin"; echo '<script>window.location = "index.php";</script>'; }else{ $msg = "please enter valid username , passw...

sql server - How to use INSERT SELECT? -

i have table's structure: [subjects] : id int identity specification yes deleted bit [juridical] : id int name varchar typeid int [individual] : id int name varchar juridical , individual it's children classes of subjects class. it's mean same rows in tables individual , subjects have same id . now have table: [mytable] : typeid varchar name varchar and want select data table , insert table structure. don't know do. tried use output : insert [individual](name) output false [subjects].[deleted] select [mytable].[name] name [mytable] [mytable].[type] = 'indv' but syntax not correct. just use: insert individual(name) select [mytable].[name] name [mytable] [mytable].[type] = 'indv' and insert subjects(deleted) select [mytable].[name] name [mytable] [mytable].[type] = 'indv' you can't insert in single query in 2 tables, need 2 separate queries that. reason split initial...

android - Unable to align bottom feature for included layout in other xml -

i have footer xml file. including file in other files like.... <relativelayout android:id="@+id/footer" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignparentbottom="true"> <include layout="@layout/footer" /> </relativelayout> but getting warning "invalid layout param in linearlayout: layout_alignparentbottom" can 1 tell me how align included xml @ bottom without using sizes you can't use property alignparentbottom in linearlayout. that's relativelayout. for linearlayout, can use layout_gravity <linearlayout> <!-- container linearlayout --> <linearlayout android:id="@+id/footer" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_gravity="bottom"> <inc...

linux - Ubunu, BlueZ, Enumerating paired devices -

using bluez bluetooth stack, how programatiacally enumerate devices paired , not connected? update: below wasn't easy thought be. adapter_get_devices starting point. helpful, if post sample out of that. if don't have enough time, can use same bt-device tool command line appropriate command line params , output via pipe. other choice use listdevices api in org.bluez.adapter interface list of paired devices , hope thing in org.bluez.devices interface you. update 2: in devices interface can use, getproperties method in answer does gsoc code sample link help. in c , hope done on python dbus well. api adapter_get_devices . yet try this.

javascript - CanJs - Iterate through an array in mustache and create observables -

... option:{ array: new can.list([1, 2, 3, 4, 5]) } ... {{#each option.array}} <div> <label for="d{{@index}}"></label> <input id="d{{@index}}" can-value="option.array[{{@index}}]"/> </div> {{/each}} above code generates 5 text boxes correct id. not create observables. what correct format should provide can-value attribute make observable? quoting part of sections/iteration documentation: the {{.}} tag reference current item within array during iteration (which used when items in array primitives strings , numbers). it seems want like: <input id="d{{@index}}" can-value="{{.}}"/>

javascript - Cannot execute body onload function in <body> from Sitemesh -

i trying create simple application includes sitemesh decorating resulting page. following simple page trying create. <%@ include file="/web-inf/jsp/include.jsp" %> <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <html> <head> <title>creating simple map</title> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=aizasyaxwlpzttcgidurbkce345xdxtfws5gues"></script> <script type="text/javascript" src="<c:url value=" /resources/js/keydragzoom_packed.js " />"></script> <script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <script type="text/javascript"> function init() { ...

Does the NEST API have an indication for the current heating/cooling/standby state -

is there way see whether system heating/cooling/standby? in other words: color of display of thermostat? (red/blue/black)? i not see value in documented api. can derive combination of factors? example, if hvac-mode=heat , target-temp > ambient must heating... unfortunately nest not give information. update nest thermostats has hvac_state returns if device off, heating, or cooling.

Arduino memory game -

this game has 4 leds , 4 buttons. game turning randomly leds on , off. the player should able push right button whenever sees 1 led turned on. the leds should turning on , off incerasing speed, reaction time of player shorter , shorter i have code know how add more leds , buttons. const int button1 = a0; const int button2 = a1; const int button3 = a2; const int button4 = a3; int led1 = 2; int led2 = 3; int led3 = 4; int led4 = 5; int ran; int right = 0; int ledorder[9]; int guessorder[9]; void setup() { serial.begin(9600); pinmode(led1,output); pinmode(led2,output); pinmode(led3,output); pinmode(led4,output); pinmode(button1,input); pinmode(button2,input); pinmode(button3,input); pinmode(button4,input); } void randomled() { (int = 0; < 9; i++) { ran = random(1,20); if (ran < 11) { digitalwrite(led1,high); delay(500); digitalwrite(led1,low); ledorder[i] = 1; } else { digitalwrite(led2,high); ...

rest - What is RESTful application? -

there has been lot of hype on rest last few years, , i've tried embrace principle , understand it's benefits. things rest still elude me, though. i'll try concise , point: can web application considered restful? benefits of this? can understand (to point) advantages of restful service, used many clients, gained using rest principles when developing application interface consumed html/js frontend? rest mandates use of verbs map crud operations , server responds representations in turn put client in new state. imply actions on resource must done through modification/creation/deletion of , possibly many other related resources? "atomicity" of such operations (i.e. transactions)? rest compliant service supposed self-descriptive (through hateoas principle), lack of metadata makes impossible client e.g. create resource without knowing fields (and types) mandatory. information must still provided out-of-band. there i'm missing here? i come more questions,...

izpanel - Izpack can not find class of custom action defined for InstallPanel -

i use 5.0.0-rc4 izpack version , izpack-installer artifact exists dependency in pom.xml. <dependency> <groupid>org.codehaus.izpack</groupid> <artifactid>izpack-installer</artifactid> <version>${izpack.version}</version> </dependency> i have defined custom action deletepreviousinstallationaction installpanel . installpanel definition included in install.xml below. <panels> <panel classname="targetpanel"/> <panel classname="userinputpanel" id="paneluserinput"/> <panel classname="installpanel"> <actions> <action stage="preconstruct" classname="com.x.y.z.w.deletepreviousinstallationaction" /> </actions> </panel> <panel classname="processpanel"/> <panel classname="simplefinishpanel"/> </panels> deleteprevi...

c# - Initial space in sheet name issue while importing sheet through OleDb objects -

i using olebb objects read excel file data table system.data.oledb.oledbconnection mycon = new system.data.oledb.oledbconnection("provider=microsoft.ace.oledb.12.0;data source='" + filename + "';extended properties=\"excel 12.0;hdr=yes;imex=1\" "); system.data.oledb.oledbdataadapter cimport = new system.data.oledb.oledbdataadapter("select * [ gravity$a3:zz]", mycon ); cimport.fill(dt) executing above query shows error : invalid bracketing of name ' gravity$a3:zz'. i think error due 1 space @ starting of sheet name " gravity". if remove space in query & write "select * [gravity$a3:zz]", shows invalid object name. how deal issue using oledb objects? try putting name between quotes system.data.oledb.oledbdataadapter cimport = new system.data.oledb.oledbdataadapter("select * [\" gravity$a3:zz\"]", mycon ); second: @panagiotiskanavos says Α3:zz doesn...

http headers - Varnish cluster and Last-Modified -

in our setup have 3 varnish servers in front of cluster of backend servers. varnish load-balancing using round-robin. resently started using bundles css , js. each generated bundle gets last-modified header backend server. store bundles 24 hours. the problem is, when varnish retrieves bundle backend server, last-modified different depending on wich backend server hit @ time. result is, approx. 50% of browser requests 200 response instead of 302 when asking conditional "if-modified-since" header. i'm looking suggestions on how solve this. manipulating headers leaving server solution, somehow seems wrong. having 1 backend server unfortunately not option, due scalability , deployment issues.

ruby on rails - Should Backbone Model represent a view or a server-side resource? -

assume situation i've rails ar models below class user has_one :profile end class profile belongs_to user has_one :address end class address belongs_to :profile end and have user profile view constructed @ client-side. now, how should backbone model like? should replicate way in rails/server-side domain model? have clear reason way has way, or subjective? your experience sharing appreciated! usually backbone models , collections should follow rest api ( or other client-side <-> server-side communication ). for example if these ruby models passed frontend : get /api/user/:id and got response is [{ profile: { address: "21st str." } },{ profile: { address: "17th str." } }] you need 1 model user = backbone.model users = backbone.collection.extend({ model: user, url: "/api/user" }); but if more complicated in api , have more urls in api choose structure best fits interaction client on frontend. example ...

git - How automatically track schema changes? -

i work on team , use git version controlling. each team member has own local mysql server. when alter table on db need query propagated among db instances. there way or tool track schema changes? we use flyway maintain db schema... can find more details @ website http://flywaydb.org/ the concept in summary is: you maintain changes in sql scripts, naming convention v< incrementingcounter >__< name >.sql you hook flyway on app start up, automatically migrates db latest version is looking for?

visual studio - Weird Powershell Console output for GetAssemblyName.FullName -

i tried this: http://blogs.msdn.com/b/sharepointdeveloperdocs/archive/2010/11/05/quick-tip-find-the-four-part-name-for-an-assembly.aspx why this 畁湳桡敭戠楥畁牦晵湥瘠湯∠敇䅴獳浥汢乹浡≥洠瑩ㄠ䄠杲浵湥⡴湥㨩†䐢牥倠慦⁤਍慨⁴楥湵腧瑬杩獥䘠牯慭⹴ഢ䤊敚汩㩥‱敚捩敨㩮റ⬊嬠祓瑳浥刮晥敬瑣潩⹮獁敳扭祬慎敭㩝䜺瑥獁敳扭祬慎敭∨⤢䘮汵乬浡൥⬊縠繾繾繾繾繾繾繾繾繾繾繾繾繾繾繾繾繾繾繾繾繾繾繾繾繾繾繾繾繾繾ൾ †⬠䌠瑡来牯䥹普††††㨠丠瑯灓捥晩敩㩤⠠⤺嬠ⱝ䴠瑥潨䥤癮捯瑡潩䕮捸灥楴湯਍††‫畆汬兹慵楬楦摥牅潲䥲⁤›牁畧敭瑮硅散瑰潩൮ ਍ is there easy way find out full name of assembly? this exception message in german encoded in euc-jp encoding, , byte stream interpreted utf-16. it reads: ausnahme beim aufrufen von "getassemblyname" mit 1 argument(en): "der pfad hat ein ung?ltiges format." in zeile:1 zeichen:1 + [system.reflection.assemblyname]::getassemblyname("").fullname + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + categoryinfo : notspecified: (:) [], methodinvocationexception + fullyqualifiederrorid : argumentexception try fixing default encodings utf-16.

ruby on rails - Existing controller adding views -

new ror. i created controller rails generate controller dave teach speak dig that created controller dave , 3 views. did backend stuff adding route , adding 3 methods under application.html.erb , correct routes. now want add more views. have go , manually type out application.html.erb , add new line routes.rb , manually create new view? (3 steps) or there line of code me original line i recommend read guides @ http://guides.rubyonrails.org/ in case http://guides.rubyonrails.org/layouts_and_rendering.html you...

c# - Clean messages in Windows Message Pump -

i don't know windows message pump guess events triggered using message pump. 1) when web browser control navigates websites ,it creates different events of document completion, once have got needed in webbrowser_document_completed() ,i want ignore further document completion.how can it? 2) if show messagebox() in document_completed(...) , shows multiple message box,shows runs on parallel threads.but when debug ,i find run on main thread.so when other 2 threads created? 3) @ same time ,when press close ,it closes window process still running in background, not using other thread still see 2 other threads when debug. lot. the direct way intercept , evaluate messages being propagated control overriding it's wndproc() method. little bit of debugger observation can identify wm_message constant corresponds target event , alter execution flow accordingly. there pretty example of on msdn site: https://msdn.microsoft.com/en-us/library/system.windows.forms.control.w...

AngularJS: Delete clicked elements parent row -

i have table of users, each row representing user. on end of each row have delete link, when clicked deletes user database. now need update table reflect changes. know how jquery, how do angular way? need add ng-model attribute each row? this how have attached click event: <a ng-click="deleteuser(user._id)">delete</a> i have <tr ng-repeat="user in users"></tr> printing out users. i'm thinking if remove user model, might way go. edit: found this question, answer question. yes correct. use ng-repeat render list of users , on delete remove user users list. since it's 2 way binding dynamically update tr's. also on ng-click, need call $http service tell database delete required user db. use factory/service create $http service.

Psql querying json arrays -

the json store in postgres db has following structure. need fetch rows in domains of email 'gmail.com' row1: { "student_id": "123", "name": "foo", "emails":[ { "id": "777", "domain": "gmail.com" }, { "id": "888", "domain": "gmail.com" } ] } row2: { "student_ id": "345", "name": "booo", "emails":[ { "id": "444", "domain": "gmail.com" }, { "id": "555", "domain": "yahoo.com" } ] } in case, result should student student_id 123 i.e. row 1. please help. given table name student , field name, holding json data, data . with mail_domain ( select (data->...

swing - Java currency symbol rendering -

i've jtable contains prices currency symbols. when show table currency symbol formatted. then try change table font , when try apply new font yen symbol not rendered. font newfont = new font(name, style, size); getdatatable().setfont(newfont);

c++ - Header file compiles multiple times and gets random errors at every compile after the first compile -

when go build c++ project, 53 errors. however, it's same list of errors 4 times in row 1 of 5 header files have in project. checked output , found attempted compile 1 header file 5 times. appears first time successful. other 4 times got errors, same errors on , on again. followed includes of lead to. based on of places include header file, makes sense try compile every time it's included. this header file that's getting compiled multiple times. first successful compile makes sense, don't understand why it's getting bunch of errors every other time compiles while building project: #ifndef transaction_h #define transaction_h #include <string> #include "account.h" #include "bstree.h" using namespace std; class transaction { public: transaction(); transaction(char type, string firstname, string lastname, int id, account* account1, int fund1, account* account2, int fund2, int amount); ~transaction(); void setptraccount...

c# - If any possibility connects database in amcharts (pie Chart) in asp.net? -

<---- below code used piechart.aspx.cs ----> protected void page_load(object sender, eventargs e) { } public chart chartuser(string userid) { chart c = new chart(); sqlconnection con = new sqlconnection("data source=.;initial catalog=emp;integrated security=true"); // sqldataadapter da = new sqldataadapter("select * chartpie id= userid + "'", con); con.open(); sqlcommand cmd = new sqlcommand("select * chartpie id='" + userid + "'", con); sqldatareader dr = cmd.executereader(); while (dr.read()) { c.userid = dr["userid"].tostring(); c.language = dr["language"].tostring(); c.percentage = dr["percentage"].tostring(); } return c; } public class chart { public string userid { get; set; } public string language { get; set; } p...

python 2.7 - Pandas HD5-query, where expression fails -

i want query hdf5-file. do df.to_hdf(pfad,'df', format='table') to write dataframe on disc. to read use hdf = pandas.hdfstore(pfad) i have list contains numpy.datetime64 values called expirations , try read portion of hd5 table dataframe, has values between expirations[1] , expirations[0] in column "expiration" . column expiration entries have format timestamp('2002-05-18 00:00:00') . i use following command: df = hdf.select('df', where=['expiration<expiration[1]','expiration>=expirations[0]']) however, fails , produces value error: valueerror: passed expression: [expiration=expirations[0]] contains invalid variable reference of variable refrences must reference axis (e.g. 'index' or 'columns'), or data_column defined references are: index,columns

xsl fo - XSL FO - XSLT for-each (doesn't show rows) -

well try explain problem.. i have xsl fo consist in 2 or n pages, @ least 2. this xsl fo : (its example cause real xsl extensive) <?xml version="1.0" encoding="iso-8859-1"?> <xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/xsl/transform" xmlns:fo="http://www.w3.org/1999/xsl/format" xmlns:barcode="org.krysalis.barcode4j.xalan.barcodeext" xmlns:common="http://exslt.org/common" xmlns:xalan="http://xml.apache.org" exclude-result-prefixes="barcode common xalan"> <xsl:template match="formulario"> <fo:root xmlns:fo="http://www.w3.org/1999/xsl/format"> <fo:layout-master-set> <fo:simple-page-master master-name="letter page" page-width="8.500in" page-height="11.000in"> <fo:region-body region-name="xsl-region-body" margin="0.700in" /...

asp.net mvc 4 - Using C# remove unnecessary “TABLE_NAME” from Excel worksheets -

can tell me, going upload excel file, file has unnecessary table "_xlnm#print_titles" need remove or delete field. method. not work remove or delete. static string[] getexcelsheetnames(string connectionstring) { oledbconnection con = null; datatable dt = null; con = new oledbconnection(connectionstring); con.open(); dt = con.getoledbschematable(oledbschemaguid.tables, null); if ((dt == null) ) { return null; } string[] excelsheetnames = new string[dt.rows.count]; int = 0; foreach (datarow row in dt.rows) { excelsheetnames[i] = row["table_name"].tostring(); if ((excelsheetnames[i].contains("_xlnm#print_titles") || (excelsheetnames[i].contains("print_titles")))) { if (true) { row.table.rows.remove(row); dt.acceptchanges(); } } i++; } return excelsheet...

VBA CSV file has missing data from excel formula -

i learning vba , have come across problem data formula blank in created csv file. i have macro updates data , runs solver solution , store result set csv file further processing. works exception numeric data not pasted csv. missing data calculated via formula, have tested manually entered data , works. have tried using pastespecial xlpastevalues error run time error '1004': application-defined or object-defined error private sub cmdsave() dim sfilename string dim wb workbook application.displayalerts = false sfilename = "photorunplan.csv" 'copy contents of required sheet ready paste new csv sheets(1).range("runplan").copy 'define own range 'open new xls workbook, save file name set wb = workbooks.add wb .title = "mytitle" .subject = "mysubject" .sheets(1).select activesheet.pastespecial xlpastevalues .saveas "c:\users\rtovey1\document...

angularjs - How to use ng-required with input type as file? -

i have form in angularjs image(logo) needs compulsory upload when particular check box checked,and if checkbox not selected user may upload image in case it's not compulsory. tried using ng-required conditional required functionality it's not working file input. html <input type="checkbox" ng-model="istrue" ng-change="ischecked()"/> controller.js $scope.check = false; $scope.ischecked = function() { $scope.check = true; } html <input id="uploadfile" placeholder="choose file" ng-model="uploadfile" ng-required="check" /> may anyone. in advance. i wanted file upload functionality , did follows. hope helps. <form id="uploader" ng-submit="uploadimage()" role="form"> <input id="image" type="file" required /> <input type="submit" value="upload" class="button btn...

javascript - Show span title on click like on mouseover -

how can show span title on click on span element? in general, span title shown on mouseover. want same when span clicked. how can done? <span title="abc">def</span> you can pseudo element. it's not clear whether 'click' intended mean mouse hold down (:active) or formal 'click' process. for former, can this. span { position: relative; } span:active:after { content:attr(title); padding:5px; border:1px solid #ccc; top:5px; right:10%; background: #bada55; } <span title="abc">def</span> for latter adding class displays pseudo element obvious solution. see jsfiddle

How is the root folder of Multi build project determined in gradle? -

before projects built settings object created contains rootdir variable. rootdir : root directory of build. root directory project directory of root project. also documentation states can never null. file getrootdir() returns root directory of build. root directory project directory of root project. returns: root directory. never returns null. i want know how rootdir determined in multi build project. highest level directory containing build.gradle? the details can discovered in test specification simple version: goes directory hierarchy , searches settings.gradle file. if not found or when started --no-search-upward can return current directory. or can pass location of settings.gradle using --settings-file .

mysql - CloudKit for my iOS game -

i'm creating ios game users can create record , store on server(currently it's own server simple sql db). next, can records id of object stored on server. current database fields: id unique auto-generated objectdata : data of user created object. it's base64 string , typical size varies 50 kb 3 mb. name : short name, user specified, string. img : png image file shows preview of user created object. typical size 100 kb. after record created: can't deleted or modified in way. record can retrieved device game installed - id . if user tries save duplicate record - server returns id of stored record. duplicate determined comparing objectdata value before writing db. my questions are: is such behavior can done in cloudkit? where can find example tutorial(in objective c) shows me hot work cloudkit , store records described? or maybe can code snippets? probably, duplicates can't checked, it's okay... main goal - implement reading , writing clo...

asp.net - Get IIS Log data in C# module -

i writing .net module iis log details before or after iis has been written log file .as per msdn documentation httpapplication.logrequest event occurs before asp.net performs logging current in logrequest handler request. so, how can log data looks below: #software: microsoft internet information services 8.0 #version: 1.0 #date: 2014-11-27 10:42:57 #fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(user-agent) cs(referer) sc-status sc-substatus sc-win32-status time-taken 2014-11-27 10:42:57 ::1 / - 29897 - ::1 mozilla/5.0+(windows+nt+6.3;+wow64)+applewebkit/537.36+khtml,+like+gecko)+chrome/39.0.2171.71+safari/537.36- 200 0 0 42905 no , cannot iis log data in httpmodule need write custom httpmodule , make log data in same iis log data looks . cannot following fields time taken , byte sent, receive, , win32 status code in custom httpmodule.

c - GCC ARM linker error - undefined reference to 'strcmp' -

i have tiva-c microcontroller project, compiled arm-none-eabi-gcc , although added string.h i'm getting 'undefined reference strcmp' linker error. i'm using precompiled toolchain: gcc-arm-none-eabi-4_8-2014q3-20140805-linux.tar.bz2 here: https://launchpad.net/gcc-arm-embedded/+download . makefile switches: # define flags cflags = -g -mthumb -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=softfp cflags +=-os -ffunction-sections -fdata-sections -md -std=c99 -wall cflags += -pedantic -dpart_$(mcu) -c -i$(tivaware_path) cflags += -dtarget_is_blizzard_ra1 ldflags = -t $(ld_script) --entry resetisr --gc-sections there others same problem they've -nostd switch on in ldflags apparently don't have. i'm out of ideas now, tip great. the problem happens because use -ld linking directly. multilib toolchain, arm-none-eabi has multiple variants of libc.a (which contains function need) , other standard libraries. -ld cannot find right libraries. to solve p...

How to install modules in different python installations using pip for Windows -

i'm trying create standalone executable pyinstaller. have python 3.4 not supported pyinstaller. downloaded python 2.7 not able install pyinstaller pip. set path variable c:/python24 still message when type python pip command console. requirement up-to-date: pip in c:\python34.... when use commands: echo %path% python pip.py i output: c:\mingw\bin;c:\program files\java\jdk1.7.0_25\bin;c:\windows\system32;c:\python34;c:\program files (x86)\ati technologies\ati.ace\core-static;c:\program files (x86)\windows kits\8.1\windows performance toolkit\;c:\program files\microsoft sql server\110\tools\binn\;c:\program files (x86)\microsoft sdks\typescript\1.0\;c:\program files\microsoft sql server\120\tools\binn\;c:\ruby193\bin;c:\program files\java\jdk1.8.0_05\bin;c:\python27;c:\python27\scripts;c:\program files (x86)\microsoft visual studio 10.0\vc requirement up-to-date: pip in c:\python34\lib\site-packages cleaning up... to install pip python 2....

networking - Network simulator - reading packets from file -

i ask if possible add packet file .pcap or .txt (packet statistic) ns input. example, if want insert packets device interface. possible ns2 / ns3? thank you yes, possible ns2.. not sure ns3.. in order in ns2, need enable 'emulation' in ns2. emulate ns2 -- 1. in terminal.. switch root mode 2. move directory 'ns-2.35' in ns2 installation. 3. run 'make nse' 4. run './configure' , emulation activated in ns2. in tcl file 1. create tap agent ' set tap1 [new agent/tap] '. 2. crate network object ' set nob [new network/pcap/file] ; 3. provide path pcap file like' $nob open readonly real/xplico_youtube_mail.pcap ' file located in ns-2.35 folder in given path. 4. in tap agent, provide network agent network.. $tap1 network $nob $ns attach-agent $node_(0) $tap1; 5. connect tap other node.. , done.

html - Auto adjust the height of container based on content -

every time put huge content details, such text goes out of container.how can make container height auto adjustable based on content;. #container { background-color: #262626; width: 1000px; min-height: 200px; margin: 0 auto; margin-top: 40px; padding-top: 20px; -webkit-border-top-left-radius: 30px; -webkit-border-top-right-radius: 30px; -moz-border-radius-topleft: 30px; -moz-border-radius-topright: 30px; border-top-left-radius: 30px; border-top-right-radius: 30px; } #main { position: relative; top: 116px; width: 980px; height: 700px; float: left; background-color: #262626; padding: 10px 10px; margin-bottom: 40px; background: -webkit-linear-gradient(#262626,#101010); /* safari */ background: -o-linear-gradient(#262626,#101010); /* opera 11.1 12.0 */ background: -moz-linear-gradient(#262626,#101010); /* firefox 3.6 15 */ background: linear-gradient(#262626,#101010); /* standard syntax *...

apache - mod rewrite absolute paths and links also to subfolder -

i want app portable root subdir without having change anything. want use alsolute paths, because in case app installed in root works out of box. root installation has priority one. in order subfolder scenario working tried several things. let app dynamicaly write .htaccess file based on folderstructure during initial install.to right rewritebase automaticaly set.this file looking that: options +followsymlinks rewriteengine on rewritebase /subfolder/ rewritecond %{request_filename} !\.(css|js|ico|font|gif|jpg|png)$ [nc] rewriterule ^(.*)$ index.php [qsa,l] of course no static file found in case, because absolute paths going root instead of subfolder. then found out how let .htaccess find own rewritebase , tried following options -indexes options +followsymlinks rewriteengine on ## determine rewritebase automatically/dynamically ## -- taken symfony .htaccess rewritecond %{request_uri}::$1 ^(/.+)/(.*)::\2$ rewriterule ^(.*) - [e=base:%1] # allow /images/*, /css/* & /...

Give alpha to an object OpenGL ES -

i new on opengl , want achieve give texture alpha 1.0 0.0 i has been searching , found "how load alpha in images" cant find how apply alpha object i has been tried with: gl.glenable(gl10.gl_alpha_test); alpha += 0.002f; if(alpha > 1) alpha = 1f; gl.glalphafunc(gl10.gl_equal, alpha); but doesnt work, how can give alpha value(to make effect of fade) object/texture? this class public class palabra { public float posx = 0f; public float posy = 0f; public float scalex = 2f; public float scaley = 2f; public float alpha= 0.5f; public state estado; private floatbuffer vertexbuffer, texbuffer; // buffer vertex-array private float[] vertices = { // vertices face 0.0f, 0.0f, 0.2f, // 0. left-bottom-front 2.1f, 0.0f, 0.2f, // 1. right-bottom-front 0.0f, 0.35f, 0.2f, // 2. left-top-front 2.1f, 0.35f, 0.2f // 3. right-top-front }; float[] texcoords = { // texture coords above face 0.00f, 0.0f, 1.0f, // a. left-bottom 1.00f, 0.0f, 1.0f, // b. right-bottom 0.00f, 0....

Perl compare two files and copy lines to new file -

i’m beginner in perl , i’m trying compare 2 files perl. 1 contains list of id’s other 1 has strings contain id’s , more text. want copy lines matching id’s third file, instead of correct strings number. have done wrong? use strict; use warnings; open ( ids , "<id.txt"); @ids = <ids>; chomp(@ids); close ids; $id = @ids; open ( meta , "<meta.txt"); @metas = <meta>; chomp(@metas); $meta = @metas; open ( out1, ">>", "outtest.txt"); foreach $id (@metas){ print out1 "$meta"."\n"; } close out1; close meta; try hash variables output: use strict; use warnings; open ( meta , "<meta.txt"); %idsvalues = (); #create 1 new hash variable while(<meta>) { $line = $_; if($line=~m{<id>(\d+)</id>\s*<string>([^<>]*)</string>}) { $idsvalues{$1} = $2; #store values , text hash variable } } close(meta); #close opened file @values; ...

NumberFormatException and other problems while making a calculator in java -

so i'm making java calculator , walking errors upon clicking function buttons (it compiles fine though). error on 1st line in cmd numberformat exception. after searching figured out somewhere in code trying double out of empty string (basically i'm trying parse double label text). i'm guessing it's part: // if statement puts labels text first or second number if(firstnumber) { number1 = double.parsedouble(label.gettext().trim()); } else { number2 = double.parsedouble(label.gettext().trim()); } basically problems when push / * + or - button numberformatexeption: input string "/" etc. can't quite figure out how have fix error (i'm still (somewhat) beginner in java). further down line of errors (there quite alot) whole lot of errors didn't understand such eventdispatchthread, eventqueue , many others. couldn't find explanation on level of experience either i'm asking here. the numeric buttons work fin...