Posts

Showing posts from June, 2012

c# - Compact Framework communication with WCF without NETCFSvcUtil generated proxies -

c# - Compact Framework communication with WCF without NETCFSvcUtil generated proxies - is possible communicate wcf service without using netcfsvcutil generate proxy? i'm trying phone call wcf service on mobile using compact framework. i not want utilize netcfsvcutil generate proxy particular reason. i have sample code on mobile side test out : // contract defined @ client side (mobile device) public interface iservice1 { string getdata(int value); } public partial class form1 : form { public form1() { initializecomponent(); } private void button1_click(object sender, eventargs e) { seek { string address = "http://192.168.30.88:8731/design_time_addresses/wcfservicelibrary1/service1/"; // throws here .... var channelfactory = createdefaultbinding().buildchannelfactory<iservice1>(new system.service...

Create TFS 2010 branch from checked out items? -

Create TFS 2010 branch from checked out items? - i've edited files in branch1 , found out check pending changes in new branch, branch2. possible? i know can create branch , re-create changed files branch2 hand can cumbersome. you can shelve changes , unshelve them branch: http://stackoverflow.com/questions/117337/can-i-unshelve-to-a-different-branch-in-tfs-2008 tfs branch

Drawing with Graphics class in C# -

Drawing with Graphics class in C# - i draw in c# mouse, if mouse pen. trying graphics class, using drawlines method receiving array of points parameter. do think improve option, or yo know if there easy way it? thanks in advance regards. look @ sample: http://www.codeproject.com/kb/graphics/drawtools.aspx specifically, pencil tool need. c# graphics

php - How do you subscribe and assign subscriber to group with the mailchimp api? -

php - How do you subscribe and assign subscriber to group with the mailchimp api? - i attempting utilize api in php subscribe , assign subscriber group. i need able create grouping on fly , i'm trying next not much success: // include other relevant files here $merge_vars = array( 'fname'=>$name[0], 'lname'=>$name[1], 'interests'=>'', 'groupings'=>'pets' ); if remove 'groupings' array, subscribing works fine - we've got going... how groups? thanks time add 1 more thing in array i.e "email" => "test@test.com" & when calling listsubscribe() check your apikey, listid, "email id add together in subscriber list comes here i.e test@test.com", email_type fields properly. try this. helpful you. php mailchimp

Not able to view SDCard folder in the FileExplorer of Android Eclipse -

Not able to view SDCard folder in the FileExplorer of Android Eclipse - i not able view sdcard folder in fileexplorer of ddms in android. able view sdcard folder when used adb command command prompt below: androidsdk\tools>adb shell $ ls i able view list of folders when typed ls in can see sdcard folder list of folders .my uncertainty how can view sdcard alternative in eclipse using fileexplorer.also want want delete or insert files in sdcard.how can possible me.can hel me in sorting out issue. in advance. i had same problem: using eclipse ddms file explorer content of sdcard not visible in folder (cyanogenmod android 4.2.2). the solution was: on device have give adb root access. here: settings / developer options / root access then content of sdcard visible in folder: /mnt/shell/emulated/0 android

c# - Setting control values in an instance of a user control WPF -

c# - Setting control values in an instance of a user control WPF - i new wpf , mvvm , trying follow design, have created window multiple user controls (10 of each) on it. these user controls hold value should able entered user , sent database. the issue have creating user controls pragmatically in canvass , not know how utilize these instances set values on command view model have savemethod binded save button save info database. help. mainwindow.xaml.cs public partial class mainwindow : window { public mainwindow() { initializecomponent(); clientratesviewmodel viewmodel = new clientratesviewmodel(); datacontext = viewmodel; viewmodel.getchargeunits(); int previoustopprerate = 10; foreach (var rate in viewmodel.clientratespreawr) { preawr preawr = new preawr(); preawr.tbpreawrrate.text = rate.clientratespreawr; preratescanvas.children.add(preawr); preawr.wi...

sendmail - WHM / cPanel - Disable PHP Send Mail For One Account -

sendmail - WHM / cPanel - Disable PHP Send Mail For One Account - i have whm / cpanel server, , particular user keeps having wordpress compromised , used send out spam. looking disable ability 1 business relationship send email out via php. after looking around, saw recommendations go whm -> tweak settings -> disable "nobody" sending mail , doesn't help me using suphp. the other recommendation manually add together disabled_functions = mail php.ini file, of course of study block users beingness able send mail. is able recommend way of doing this, either within php.ini or whm / cpanel itself? thanks! you can create separate php.ini file user , disable mail service function in php.ini file, php sendmail cpanel whm

security - Advantages of Hash Verification of Parameters and Content over TLS -

security - Advantages of Hash Verification of Parameters and Content over TLS - when researching approaches securing web services, found application hashes portions of url in add-on utilizing tls. found specification proposes verify body of request producing hash , verifying content server side (specification follows): final: oauth request body hash in specification, mentions: nonce checking , utilize of https can mitigate risk, may not available in environments. when nonce checking , https used, signing request body provides additional layer of defense. looking @ oauth 2.0 specification, seems though have deemed these steps unnecessary when application configured/coded, instead relying on tls provide security features, of which, believe, includes tamper proofing. while there has been criticism specification people former lead author, has been said (by same person) when implemented, secure. is there real benefit these hashing procedures? there known attacks comprom...

c# - check the selected value in drop down list -

c# - check the selected value in drop down list - i have next drop downwards list. how can check selected value before saving info module ? because want utilize selected value in setting values of neighborhood's drop downwards list. @html.dropdownlistfor(model => model.city, new selectlist( new list<object>{ new { value = "abha" , text = "abha" }, new { value = "al qunfudhah" , text = "al qunfudhah" }, new { value = "al-kharj" , text = "al-kharj"}, new { value = "al-ahsa" , text = "al-ahsa" }, new { value = "buraidah" , text = "buraidah"}, new { value = "dammam" , text = "dammam" }, new { value = "ha'il" , text = "ha'il"}, new { va...

java - How to stretch an image so that it fits the entire screen in javafx -

java - How to stretch an image so that it fits the entire screen in javafx - relevant code package whowantstobeamillionairetriviagame; import javafx.application.application; import javafx.scene.scene; import javafx.scene.image.image; import javafx.scene.layout.background; import javafx.scene.layout.backgroundimage; import javafx.scene.layout.backgroundposition; import javafx.scene.layout.backgroundrepeat; import javafx.scene.layout.backgroundsize; import javafx.scene.layout.stackpane; import javafx.stage.stage; public class whowantstobeamillionairetriviagame extends application { @override public void start(stage startingstage) throws exception { image backgroundcolor = new image("http://www.sonomare.com/darkblue_background_rot_180.jpg"); backgroundsize backgroundsize = new backgroundsize(100, 100, true, true, true, false); backgroundimage backgroundimage = new backgroundimage(backgroundcolor, backgroundrepeat.no_repeat, backgroundrepeat.no_repe...

c# - Subscribing to changes in a nested list with a property bound to a checkbox -

c# - Subscribing to changes in a nested list with a property bound to a checkbox - i trying prevent user continuing until have selected @ to the lowest degree 1 item in list. list bound separate view command within main view , list viewmodel has bool 2 way binding checkbox in view. command go on part of main viewmodel seek , hear changes creating derived list templist = this.whenanyvalue(x => x.items, (layers) => layers == null ? enumerable.empty<bool>() : layers.createderivedcollection(x => x.selected)) .toproperty(this, x => x.templist); cancontinue = this.whenanyvalue(m => m.collectioninfo, m => m.templist, (collectiondatabase, tempitems) => { if (collectiondatabase == null || tempitems == null) homecoming false; var temp = tempitems.any(x => x == true); homecoming temp; }); the problem templist never changes. can see selected property changing on kid viewmodel that's it. i have tried assigning templist as temp...

c# - Entity Framework IsUnique and accept Nulls -

c# - Entity Framework IsUnique and accept Nulls - how can create code first property accepts null values it's [index(isunique=true)] ? for example: passport number should't repeated, ergo isunique , if user doesn't insert one, defaults null, accepts multiple nulls. since not unique then, cannot way. can manage it, attaching table: public class person { public int id { get; set; } } public class passport { [key] public int personid { get; set; } [foreignkey("personid")] public person person { get; set; } [index(isunique=true)] public string passportid { get; set; } } be aware, there countries, not allow storing such numbers. c# entity-framework

Swift: I get Debugging "errors" when I try to make my program work -

Swift: I get Debugging "errors" when I try to make my program work - i followed online tutorial on youtube hello world programme swift. though typed code code in tutorial till gives me debugging error (the greenish errors). researched problems code complicated , on head. code in java, have been wanting develop mobile. anyways, if can tell me: 1. error means. 2. how can prepare it. 3. how can prevent errors this. namelabel.text = "hi (nametextfield.text)" line error on. here code: import uikit class viewcontroller: uiviewcontroller { @iboutlet var namelabel: uilabel! override func viewdidload() { super.viewdidload() // additional setup after loading view, typically nib. } override func didreceivememorywarning() { super.didreceivememorywarning() // dispose of resources can recreated. } @ibaction func helloworldaction(nametextfield: uitextfield) { namelabel.text = "hi \(nametextfield.text)" } } namete...

reporting services - How can I disable text box in ssrs reports? or can I add validation to textbox on focus out? -

reporting services - How can I disable text box in ssrs reports? or can I add validation to textbox on focus out? - i have text box , date picker. user needs come in start , end date generate report. how can create textbox disabled? if not then, can prompt message user date shown in wrong format whenever user enters date manually. i want check performed before study fetched. validation reporting-services textbox

javascript - How to do image slide over another image when mouse over..? -

javascript - How to do image slide over another image when mouse over..? - html <img id="1" src="http://tinyurl.com/ksl52ao"/> <div class="wrap" id="2"> <img src="http://tinyurl.com/lgua65m"/> <p class="text_over_image" style="font-size:36px;">text</p> </div> css .wrap { height:auto; margin: auto; text-align:center; position:relative; } .text_over_image { position: absolute; margin: auto; top: 0; left:0; right:0; bottom:0; color:red; height:0px; } jquery $("#2").hide(); $("#1").mouseover(function(){ $("#1").hide(); $("#2").show(); }); $("#2").mouseout(function(){ $("#2").hide(); $("#1").show(); }); here can show hidden image when mouse on image. need slide sec image bottom top when mouse over. jsfiddle apply ...

timeout - Is WCF binding SendTimeout only used to initialize channel OperationTimeout? -

timeout - Is WCF binding SendTimeout only used to initialize channel OperationTimeout? - note: read this, that , yonder, , it's still not exclusively clear if this: the wcf binding sendtimeout, wcf icontextchannel operationtimeout both, according msdn: gets or sets period of time within operation must finish or exception thrown. (if transaction flow enabled on binding or channel, operation may take longer execute specified timeout. in these circumstances operation fails due expired timeout , transaction aborts appropriately.) and according msdn: sendtimeout – used initialize operationtimeout, governs whole process of sending message, including receiving reply message request/reply service operation. so, sendtimeout property of binding is not used real timeout @ all, just(??!) used initialize default of (all?) communication channels' operationtimeout ? note: verified when set binding.sendtimeout non-default value, channel returned channelfactory.cre...

Open Facebook Event in Android? -

Open Facebook Event in Android? - in android, there way open facebook application in specific event page? there intent this? if app installed create action view intent direct "fb://event/" , app open. if isn't, throw exception. alternative: utilize direct url of facebook event, , browser open. android facebook android-intent

ruby on rails - unicorn can't restart because `parse_rackup_file': rackup file (master) not readable -

ruby on rails - unicorn can't restart because `parse_rackup_file': rackup file (master) not readable - after execute kill -9 pid_of_unicorn command unicorn instance, can never restart it. utilize unicorn master -c config/unicorn.rb in rails app root path , unicorn.rb file unicorn config file in rails's config directory. /home/wujing/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/unicorn-4.8.3/lib/unicorn/configurator.rb:659:in `parse_rackup_file': rackup file (master) not readable (argumenterror) /home/wujing/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/unicorn-4.8.3/lib/unicorn/configurator.rb:77:in `reload' /home/wujing/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/unicorn-4.8.3/lib/unicorn/configurator.rb:68:in `initialize' /home/wujing/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:100:in `new' /home/wujing/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/unicorn-4.8.3/lib/unicorn/http_server.r...

hadoop - "single point of failure" job tracker node goes down and Map jobs are either running or writing the output -

hadoop - "single point of failure" job tracker node goes down and Map jobs are either running or writing the output - i'm new hadoop , know happens when "single point of failure" job tracker node goes downwards , map jobs either running or writing output. jobtracker starts mapjobs on 1 time again ? job tracker single point of failure meaning if goes downwards wont able submit additional map/reduce jobs , existing jobs killed. when restart job tracker, need resubmit whole job again. hadoop mapreduce

ASP.NET NHibernate transaction duration -

ASP.NET NHibernate transaction duration - currently in our asp.net app have 1 session per request, , create 1 transaction every time load or update , object. see below: public static t findbyid<t>(object id) { isession session = nhibernatehelper.getcurrentsession(); itransaction tx = session.begintransaction(); seek { obj = session.get<t>(id); tx.commit(); } grab { session.close(); throw; } { tx.dispose(); } homecoming obj; } public virtual void save() { isession session = nhibernatehelper.getcurrentsession(); itransaction transaction = session.begintransaction(); seek { if (!ispersisted) { session.save(this); } else { session.saveorupdatecopy(this); } ...

SQL Server 2005 Partition table by foreign referenced data -

SQL Server 2005 Partition table by foreign referenced data - is there canonical way partition table referenced info table? for example timetable id datetime bigtable id timetable_id -- foreign key .. other info .. i want partition bigtable datetime in timetable. thankx. as noted here, partitioning column must part of unique indexes on table, include primary key. i think selection here denormalize timetable.datetime column bigtable column available partitioning. sql-server sql-server-2005 partitioning

javascript - What's the difference between "function x.y()" and "x.y = function ()"? -

javascript - What's the difference between "function x.y()" and "x.y = function ()"? - the difference between these 2 pieces of code in line 1 in both blockquotes. why these 2 pieces of code behave different? function cat.meow() { console.log("meow"); }; versus cat.meow = function () { console.log("meow"); }; the first 1 invalid javascript, sec improve idea, more details in following... why? variable / function names can have letters, underscores, $, numbers (if they're not first character) along few other acii, , unicode characters (check here or here recommended kaiido , felix king). same var cat.meow; invalid javascript , throw error. more specifically syntaxerror: unexpected token '.'. the compiler expecting parenthesis or space sees period not assuming object. happens bracket syntax object :( means can't define function object 'item' first way explanation when do: f...

android - Multiple Edit text change listner issue -

android - Multiple Edit text change listner issue - i have 2 edittext fields,and have created 2 separate listeners them below. protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); email=(edittext)findviewbyid(r.id.email); password=(edittext)findviewbyid(r.id.password); email.addtextchangedlistener(new textwatcher() { public void aftertextchanged(editable s) { emailflag=true; } public void beforetextchanged(charsequence s, int start, int count, int after) { } public void ontextchanged(charsequence s, int start, int before, int count) { } }); password.addtextchangedlistener(new textwatcher() { public void aftertextchanged(editable s) { ...

Reading every 100 lines (or less) from an open file in Python -

Reading every 100 lines (or less) from an open file in Python - i have file 100s of thousands of records, 1 per line. need read 100, process them, read 100, process them , forth. don't want load many records , maintain them in memory. how read (until eof) either 100 or less (when eof encountered) lines open file using python? islice() can used retrieve next n items of iterator. from itertools import islice open(...) file: while true: lines = list(islice(file, 100)) line in lines: # stuff if not lines: break python

sql server - Windows: Cannot delete myDB.mdf because the file is open in System -

sql server - Windows: Cannot delete myDB.mdf because the file is open in System - this strangest thing ever. company's product uses database file microsoft sql server 2008 r2, let's it's named mydb.mdf . want delete file , replace same-named database system. seek delete it, , of course of study can't because it's in utilize process. reboot ensure nothing's still running has file open, , still can't delete (same reason). fire sysinternals processexplorer , find->find handle or dll , come in filename. process has open named 'system' , has pid of 4. go command panel -> programs , features , one-by-one, uninstall of components of microsoft sql server 2008 r2. still can't delete it. oh, have ms sql server 2012 installed... maybe that's it. uninstall components of that. , other sql thing microsoft, uninstall too. still can't delete it. reboot. don't open anything, , still can't delete it. gives error "file in use: a...

java - Common class for singleton -

java - Common class for singleton - i writing programme in 12 classes need singleton, due using messaging service needs different types. question is, instead of re-create , pasting singleton code each creating instance changing class makes instance of. there someway have mutual code used singleton pattern, class needs create singleton? here code create 1 of singletons, public static void create() { if(instance == null) { instance = new foodatawriter(); } } you have re-create , paste whatever code using implement singleton, according effective java (2nd edition, p.18) best way enforce singleton utilize one-element enum: public enum mysingleton { instance; // methods } if way there's nil re-create , paste! java design-patterns singleton common-code

php - Eloquent Tinker - Undefined Constant -

php - Eloquent Tinker - Undefined Constant - i'm next along set of tutorials on laravel (they're excellent), , maintain running error: php error: utilize of undefined constant article whenever come in line of code: $article = new app/article; i've followed letter, , used command: $ php artisan make:model article model created successfully. created migration: 2015_04_11_152306_create_ar what find unusual in tutorial, no migration created when command called. anyways, i'm trying come in info sqlite database through tinker, i'm unable create article object, , hence cannot insert database. how got either solving or bypassing issue? you should utilize backslash \ : $article = new app\article; php laravel eloquent artisan artisan-migrate

Java Swing Animations -

Java Swing Animations - i have java project lift management system. my problem in 2 jpanel 's. first jlabel 's , button 's, 1 each floor - utilize layout because want responsive. before programme start have dialog can set first , lastly floor level. here's code: public void setfloors() { floornavigation = new jpanel(); floornavigation.setlayout(new boxlayout(floornavigation, boxlayout.y_axis)); floornavigation.add(box.createverticalglue()); for(jpanel p : floorpanels){ floornavigation.add(p); } floornavigation.add(box.createverticalglue()); frame.add(floornavigation, borderlayout.line_start); } public void createfloorpanel() { jpanel floorpanel; for(jlabel l : floorlabels){ floorpanel = new jpanel(new flowlayout()); floorpanel.add(l); floorpanel.add(floorbuttons.get(floorlabels.indexof(l))); floorpanels.add(floorpanel); } } i want create lift move animation y of each jlab...

Get and Set ("private") in C disadvantages? -

Get and Set ("private") in C disadvantages? - i wanted create struct in c info couldn't accessed directly, through gets , sets in object oriented. solution like: point.h #ifndef point_h #define point_h typedef struct point point; point *createpoint(int x, int y); int point_getx(point *point); void point_setx(point *point, int x); int point_gety(point *point); void point_sety(point *point, int y); void deletepoint(point **p); #endif /* point_h */ point.c #include "point.h" struct point{ int x, y; }; point *createpoint(int x, int y){ point *p = malloc(sizeof(point)); if (p == null) homecoming null; p->x = x; p->y = y; homecoming p; } int point_getx(point *point){ homecoming point->x; } void point_setx(point *point, int x){ point->x = x; } int point_gety(point *point){ homecoming point->y; } void point_sety(point *point, int y){ point->y = y; } void deletepoint(point **p){ ...

c - Malloc return 0? -

c - Malloc return 0? - i'm doing homework project in c using dev-c++ compiler. strangely, i've stucked @ malloc function returns me 0 mean out of heap memory. hardly uncertainty memory full. i've included windows.h library. this problematic part of function. printf gives me: 00000000 ... 00000000 .... 005c1058 what wrong here? typedef struct tcat { char *namec; struct tcat *nextc; struct tprod *firstp; }ctgr; typedef struct tprod { char *namep; float price; int qt; struct tprod *nextp; }prdct; void srch(int i) { //data base of operations population int k,r; //categories of components ctgr *p,*primc; primc = (ctgr *)malloc(sizeof(ctgr)); primc -> namec = "resistances"; p = primc -> nextc; p -> namec = "capacitors"; p -> nextc = 0; prdct *q,*primrp,*primcp; primrp = (prdct *)malloc(sizeof(prdct)); primcp = (prdct *)malloc(sizeof(prdct)); ...

How to create insert data with checkbox php jquery -

How to create insert data with checkbox php jquery - i have form : but don't know how create insert info take info checkbox. can tell me how create or if have tutorial please tell me. use below: <?php if(isset($_post['submit'])){ foreach($_post['input'] $value){ echo $value; } } ?> <form action="" method="post"> <input type="checkbox" name="input[]" value="1"> <input type="checkbox" name="input[]" value="2"> <input type="checkbox" name="input[]" value="3"> <input type="checkbox" name="input[]" value="4"> <input type="submit" name="submit" value="submit" /> </form> php jquery

Python 2D image generation -

Python 2D image generation - what of improve libraries image generation in python? if implement gotcha (for example's sake), thereby having manipulate image on pixel level, options be? ideally save resulting image low-resolution jpeg, mere wishing, i'll settle mutual image format. thank attention. the python imaging library (pil) de facto image manipulation library on python. can find here, or through easy_install or pip if have them. python image image-processing

oauth - Where can I see how many users my Twitter-Application? -

oauth - Where can I see how many users my Twitter-Application? - i created twitter-application , want know how many user utilize (gave access it). remember seeing such value when developing it, can't find anymore. can see somewhere or mind playing games me? twitter used display number when opened application settings @ http://twitter.com/oauth_clients, appears have taken useful number away. oauth twitter

Restore a previous git commit? -

Restore a previous git commit? - apparently old bug prepare commit of mine got dropped during recent merge of old branch new. found commit in logs , have id (403357cab89465ce68001762d35fe27b57aeec65). want restore commit current working branch can firstly diff changes commit them in again. how can this? git checkout 403357cab89465ce68001762d35fe27b57aeec65 doesn't work. and way, commit involved edits multiple files. do git cherry-pick sha1 , pull commit on top of current head. git

android - How to change Option Menu Item layout? -

android - How to change Option Menu Item layout? - how customize alternative menu item layout xml or programmatically. found many question no reply yet. how alter alternative menu style how alter layout clicking items of menu? how alter menu item color & size programmatically? <item android:id="@+id/itemid" android:title="item title" app:showasaction="always" app:actionlayout="@layout/menu_item_layout" /> note layout shown only in actionbar. if item in overflow menu title shown. android xml menuitem optionmenu

java - How to draw a line from the point to X axis, in the JavaFX ScatterChart? -

java - How to draw a line from the point to X axis, in the JavaFX ScatterChart? - now work javafx scatterchart , need draw line point of info x axis, show in image below. thak help!! you'll have create custom chart , add together lines custom nodes. similar marker lines in reply adding line in javafx chart question. java charts javafx javafx-8

angularjs - How to pass string with special characters in AJAX angular js and get value in phalcon php? -

angularjs - How to pass string with special characters in AJAX angular js and get value in phalcon php? - how can request values in phalcon php? here code handlerajax.fetchjson('/application/nbe/nbe-opticaldevices/getterminalports/'+sitename, function(data, status){ ...... ...... } here sitename illustration "example1/example2&test" this. what format above value in phalcon php? angularjs phalcon

objective c - Swift setting object to nil does not release memory -

objective c - Swift setting object to nil does not release memory - i have optional property of class of type viewcontroller var vc : uiviewcontroller()? i later nowadays view controller popover using custom code. upon dismissing popover controller set variable nil vc = nil but object never release (and dealloc method of viewcontroller not called) this worked in objective c not in swift me is there else have in order forcefulness object released in swift (other setting nil)? objective-c swift memory-management

c - Segmentation Fault when Creating an AVL Tree -

c - Segmentation Fault when Creating an AVL Tree - i'm attempting create basic avl tree in c , i'm running unusual problem. i've got struct nodes of tree, , struct tree contains pointer root of tree , number of elements has in it. i'm getting seg. fault when seek initialize tree: struct node{ char *word; int balance; struct node *children[2]; }; struct tree{ struct node *root; size_t numelements; }; struct tree *treecreate(void){ struct tree *t; t->root = null; t->numelements = 0; homecoming t; } int main(int argc, char **argv){ struct tree *t = treecreate(); homecoming 0; } i can't think of reason problem haven't done pointers yet? c tree avl-tree

html - Websharper, Sitelets and Forms -

html - Websharper, Sitelets and Forms - i've been trying create form using websharper collect user input. far i've identified 3 actions site: type myaction = | [<compiledname "">] index | [<method "post">] getuser of username : string | stats of username: string using sitelet.infer i've managed implement basic ui, have no thought how refer content of input box (usernameinput): sitelet.infer <| function | index -> content.pagecontent <| fun ctx -> allow usernameinput= input [text ""] { page.default title = "welcome!" body = [ div [ form [ usernameinput-< [name "username" ] input [value "request"] -< [type "submit...

github - How could I get code of the application deployed on digital ocean? -

github - How could I get code of the application deployed on digital ocean? - i need edit application developed else in meteor.js deployed on digitalocean. have access digitalocean account, have no thought how access code , whole folder application stored. possible ? should inquire him github repo app instead ? thanks. ask repo. server may contain built version of app (since that's that's needed run it) , that's no developing. can't edit directly. github meteor digital-ocean

How to use IF or ELSE statements in Python? BTW, How is my username and profile picture? -

How to use IF or ELSE statements in Python? BTW, How is my username and profile picture? - i want write function takes number between 1 , 7 parameter , prints out corresponding day string. for example, if parameter 1, function should print out one . if parameter 2, function should print out two , etc. i wrote program, not getting output. sure using if , else statements correctly my program: def string(x): if x=="1": word = "one" else: if x=="2": word = "two" else: if x=="3": word = "three" else: if x=="4": word = "four" else: if x=="5": word = "five" else: if x=="6": word = "six" else: if x=="7": ...

Is it possible navigate to a certain screen after open a push notification toast on windows phone app? -

Is it possible navigate to a certain screen after open a push notification toast on windows phone app? - i´m doing app force notifications on mfp 7 , want open screen specific info after tap on toast force notification, have found info don´t know how pass parameters of screen , others need. i´m using http adapter send notifications if you're using event source notifications send specialized parameter payload , check value app loading (or when force displayed, doesn't matter). then, alter specific page content based on payload value. for example, here i'm sending payload "foo" value "bar": wl.server.notifyalldevices(usersubscription, { badge: 1, sound: "sound.mp3", activatebuttonlabel: "clickme", alert: notificationtext, payload: { foo : 'bar'     } }); and in app logic check value: function pushnotificationreceived(props, payload) {     if (payload.foo == ...

html - javascript doesn't work in IE (getElementById) -

html - javascript doesn't work in IE (getElementById) - i'm using form 2 submit buttons , js 2 functions utilize either one. <form action="" name="submit" id="step_1_form" method="post" accept-charset="utf-8"> ... <input type="submit" value="speichern & zurück" class="backbutton" form="absenden" name="saveandback" onclick="saveandback()" /> <input type="submit" value="speichern & step 2" class="send" form="absenden" name="saveandfurther" onclick="step2()" /> </form> js var form=document.getelementbyid("step_1_form"); function step2() { form.action="step2.php"; form.submit(); } function saveandback() { form.action="scripts/saveandback.php"; form.submit(); } it works in safari, chrome , firefox, not in ie. may hel...

javascript - getting infinite loop when loading images via ajax -

javascript - getting infinite loop when loading images via ajax - i'm trying create user uploaded files private in node.js. , i'm using angular serve file in client side. <div ng-repeat="message in messages"> <div class="details" ng-if="message.type == 'photo'"> <img ng-src="{{ chat_ctrl.getphoto(message.photo, message.conversation_id, message.type) }}" class="message-photo" alt="{{ message.text }}"> <p>{{ message.text }}</p> <small am-time-ago="message.timestamp" am-preprocess="unix"></small> </div> </div> here's function i'm using file. me.getphoto = function(url, id, message_type){ if(message_type == 'photo'){ requestsservice.getphoto(url, id).then(function(response){ console.log(response); //returns data-uri of image ...

java - Save on off switch state when navigating to alternative area in app -

java - Save on off switch state when navigating to alternative area in app - i making app iphones , android using 3rd party app maker, quite simple having issues 1 part in particular. in 1 folder there yes no switch, want create when user changes yes remain way no matter navigate next. have alternative utilize html css , java this. below code have set out far switch cant remain on no matter trying. 1) switch not remain on yes users remain in default alternative of no until specific user of app switches yes. i not pro coder know basics of html , css advise , suggestions appreciated. essentially thinking of using java cookie method, work ? update:- http://jsfiddle.net/lucianlegion/dp4tj/100/ $(function () { var info = localstorage.getitem("showning"); if (data !== null) { $("input[name='onoffswitch']").attr("checked", "checked"); } }); $("input[name='onoffswitch']").click(function () { i...

javascript - From select dropdown to boxes -

javascript - From select dropdown to boxes - is there way create drop-down simple box without changing tags? or there simpler way transform radio-button still keeping back-end functionality? this have: and want do: it website built using wordpress , woocommerce plugin. javascript html wordpress drop-down-menu woocommerce

iphone - Disable UIWebView default scrolling behavior using objective-c -

iphone - Disable UIWebView default scrolling behavior using objective-c - i know can utilize javascript this <script type="text/javascript"> touchmove = function(event) { event.preventdefault(); } is there way same using objective-c? try this... uiview * v = [[webview subviews] lastobject]; [v setscrollenabled:no]; [v bounces:no]; edit: added checks original reply based on comment below uiview * v = [[webview subviews] lastobject]; if([v iskindofclass:[uiscrollview class] ]) { if ([v respondstoselector:@selector(setscrollenabled]) { [v setscrollenabled:no]; } if ([v respondstoselector:@selector(bounces)]) { [v bounces:no]; } } iphone objective-c uiwebview

java - SQLException: No suitable driver found for jdbc:derby://localhost:1527 -

java - SQLException: No suitable driver found for jdbc:derby://localhost:1527 - i error in netbeans: java.sql.sqlexception: no suitable driver found jdbc:derby://localhost:1527/ how caused , how can solve it? java.sql.sqlexception: no suitable driver found jdbc:derby://localhost:1527/ this exception has 2 causes: the driver not loaded. the jdbc url malformed. in case, i'd expect see database name @ end of connection string. illustration (use create=true if want database created if doesn't exist): jdbc:derby://localhost:1527/dbname;create=true databases created default in directory network server started up. can specify absolute path database location: jdbc:derby://localhost:1527//home/pascal/derbydbs/dbname;create=true and in case, check derbyclient.jar on class path , loading appropriate driver org.apache.derby.jdbc.clientdriver when working in server mode. java jdbc derby

html - php from action value get from drop-down list -

html - php from action value get from drop-down list - my goal 2 drop downwards values , 1. pass them action , 2. pass them $_post next .php page. in short want select action php page using drop-down menu. what doing wrong here, whatever select page drop-down menu default select page1.php <html> <body> <select name='page'> <option value='page1.php'>page1</option> <option value='page2.php'>page2</option> </select> <form name="page" method="post" action="<?php echo $_post['page']; ?>"> <?php // db connection info: include 'db_connection.php'; $sql = "show tables"; $result = mysql_query($sql); echo "<select name='param1'>"; while ($row = mysql_fetch_array($result)) { echo "<option value='" . $row['tables_in_radius'] . "'>" . $row['tables_in_radius'] ...

html - How to write text after a circle with a number in it -

html - How to write text after a circle with a number in it - so,i'm struggling solve unusual thing happens in html code. i've been trying 3 days or maybe more cannot find out 'problem'. class="snippet-code-css lang-css prettyprint-override"> .variola { max-width: 100%; margin-top: 0.5em; margin-bottom: 1em; -webkit-box-shadow: rgba(0, 0, 0, 0.199219) 0px 0px 20px; background: white; border: 1px solid #ccc; border-bottom-left-radius: 5px 5px; border-bottom-right-radius: 5px 5px; border-top-left-radius: 5px 5px; border-top-right-radius: 5px 5px; padding: 8px; " } </style> <style> .cerculet { display: block; font-size: 120%; line-height: 145%; width: 1.6em; height: 1.6em; text-align: center; border-radius: 50%; background-color: black; color: white; white-space: nowrap; } </style> <style> .introducere { display: table-cell; vertical-align...

camera - Cannot transfer video from Sony HDR-AZ1 to iOS device via the CameraRemoteAPI -

camera - Cannot transfer video from Sony HDR-AZ1 to iOS device via the CameraRemoteAPI - we developing application record short video snippets hdr-az1 , far can transfer images. need transfer mp4 files, cannot find documentation perform task. has 1 implemented solution transferring video hdr-az1? take @ documentation in sony_cameraremoteapibeta_api-reference_v2.00.pdf on pages 18 , 20. these describe apis necessary transfer video files. ios camera sony sony-camera-api

javascript - Display image after selecting file -

javascript - Display image after selecting file - <label id="lblfileuploadprofile"> <asp:fileupload runat="server" id="imageprofileupload" /> <asp:image runat="server" id="imgprofilepic" imageurl="img/user-5.png" /> i utilize upload image how display when upload done useing js ? try approach: <img id="blah" class="photo" imageurl="img/user-5.png" /> <label for="imginp" class="custom-file-upload"> <i class="fa fa-cloud-upload"></i>add image </label> <input type='file' id="imginp" name="image" /> <script> //preview & update image before uploaded function readurl(input) { if (input.files && input.files[0]) { var reader = new filereader(); reader.onload = function (e) { $('#blah').at...

PayPal SDK with Laravel: SSL certificate proble: self signed certificate in certificate chain -

PayPal SDK with Laravel: SSL certificate proble: self signed certificate in certificate chain - when trying process payment request using paypal sdk within laravel 5, come across next error: paypalconnectionexception in paypalhttpconnection.php line 140: ssl certificate problem: self signed certificate in certificate chain this part of processing code: use app\http\requests; utilize app\http\controllers\controller; utilize illuminate\support\facades\db; utilize illuminate\support\facades\input; utilize illuminate\http\request; utilize app\square; utilize app\tempcell; utilize paypal\api\amount; utilize paypal\api\details; utilize paypal\api\item; utilize paypal\api\itemlist; utilize paypal\api\payer; utilize paypal\api\payment; utilize paypal\api\redirecturls; utilize paypal\api\transaction; utilize paypal\rest\apicontext; utilize paypal\auth\oauthtokencredential; $quantity = input::get('additional_squares') + 1; $user_messa...

javascript - Jquery GET returns 200 with Content-Length=0 with CORS enabled at server -

javascript - Jquery GET returns 200 with Content-Length=0 with CORS enabled at server - some json info expected restful api get. browser(chrome , firefox) can obtain , display json info if restful url entered straight @ browser. same phone call turns status 200 content-length=0 in response header. here simple testing code. refresh button click triggers server; test button click triggers testing server. cors extension on chrome, on testing server successful json data. response server empty. tried enable cors on rest server running tomcat7. did not help. tried different method such getjson , ajax, results same. $(document).ready(function(){ $("#refresh").button().click(function(){ var root = 'http://192.168.1.77:8080/aaa/api'; $.get(root + '/availableresources/list', function(data){ console.log(data); }); }); $("#test").button().click(function(){ var testurl = 'http://jsonplaceholder.typicod...

javascript - Change properties of a class from time to time -

javascript - Change properties of a class from time to time - i have 2 functions. in first 1 increment variable adding 100 , set setinterval funcion repeats after time. other function class, contrusctor create object. want this.x_origen increased adding aumento after time , repeat it. i'm getting here first function increases aument , finishes , sec function starts. how can solve this? var aument = 0; function aumento(){ aument = aument + 100; homecoming aument; } setinterval(function () {aumento()}, 1000/50); function create_class_brick (x_origen_in, y_origen_in, x_final_in, y_final_in, mi_estado, mi_velocidad, mi_id){ this.x_origen = x_origen_in + aumento(); this.y_origen = y_origen_in; this.x_final = x_final_in + aumento(); this.y_final = y_final_in; this.estado = mi_estado; this.velocidad = mi_velocidad; this.id_elemento = mi_id; this.desplazar_ladrillo = desplazar_ladrillo; this.f0 = f0; this.f2 = f2; ...

python - How to stop elements in list from changing? -

python - How to stop elements in list from changing? - i'm not sure going on here. elements in list maintain changing. table._row_gen generator instance, , creates rows table. source here. it returns dict ; can dict straight table._row_gen.stats . def test_append(self): start_stats = {'step':250,'offset':13,'inc':113,'danger':0,'input':none} gen = statgenerator(start_stats) table = pathtable(gen) stats_list = [] in xrange(50): stats_list.append(table._row_gen.stats) print stats_list[i] table._row_gen.next() assert stats_list[0]['step'] == 250 this should build list of rows stats_list . the print works fine , displays right output: {'danger': 0, 'input': none, 'step': 250, 'inc': 113, 'offset': 13} {'enc': false, 'danger': 113, 'rnd': 216, 'step': 252, ...

excel - Spreadsheet Formula, return the row whose range matches a value -

excel - Spreadsheet Formula, return the row whose range matches a value - i have info table below, , want given value 'x' in 'a' , lower value in 'b'. for instance 10.000 should homecoming 0, 38.000 should homecoming 7,8 , 900.000 should homecoming 20. in locale '.' means one thousand separator , ',' decimals. if possible formula works in excel , gdocs. thanks. b 0 0 37.500,01 7,8 45.000,01 9,1 58.345,62 11,4 120.206,02 13,6 208.075,91 15,7 295.242,83 17,2 382.409,77 18,2 600.000,01 20 i don't know gdocs in excel seek following. =vlookup(value ; $a$1:$b$9 ; 2 ; 1) where value value searching for. the prerequisite column a must sorted in ascending order, have in example. excel google-spreadsheet excel-formula

REplace issue in livecode -

REplace issue in livecode - how overcome issue relating replaces. need replace " snn" "" & " sss" & "" in myhtml. replace " snn" " sss". not work in begin of line(newline, \n). let's assume have next data the man stands on floor man etc in field 1. can replace occurrence of the or the or space & the or linefeed & the an using next syntax on mouseup set word 1 -1 of replacetext(space & fld 1,"[\n ][tt]he "," ") end mouseup note preceding space, removed 1 time again using word 1 -1 . unfortunately, syntax replaces linefeeds spaces. id on't know if want this. if not, i'd suggest using 2 lines, 1 space , 1 linefeed. on mouseup set replacetext(space & fld 1,"[\n]([tt]he) ",cr & "an ") mytempvar set word 1 -1 of replacetext(mytempvar,"[ ]([tt]he) "," ") end mouseup it se...

selenium webdriver - How to know web page has been loaded completely using phantomjsdriver in java -

selenium webdriver - How to know web page has been loaded completely using phantomjsdriver in java - here, getting page content using phantomjsdriver . able finish content of static web pages. but,i not able finish content of web pages having ajax calls(dynamic web-pages). when seek below code able content of dynamic web-pages. can't predict loading time of page. so,i looking functions tells page been loaded completely. webdriver driver = new phantomjsdriver(caps); driver.get("http://www.blackwoods.com.au/search/flat-cut-off-wheels-metal-flexovit/302022874"); thread.sleep(10000); system.out.println(driver.getpagesource()); driver.quit(); here, want utilize function other thread.sleep(10000) ;. even tried below code. didn't finish content webdriver driver = new phantomjsdriver(caps); driver.get("http://www.blackwoods.com.au/search/flat-cut-off-wheels-metal- flexovit/302022874"); webdriverwait wait = new webdriverwait(driver,15); ...

javascript - How to make this book shelf grid have drag/select features? -

javascript - How to make this book shelf grid have drag/select features? - introduction i writing toy project proof of concept , force myself. application asp.net5 mvc6 library user interface. want create grid representation of library shelf dynamic properties, i stuck on lastly 2 weeks. entire thing open source , can find have done far here. problem i want user able drag finger across grid select whatever want. unselect same gesture. thought "check out" books doing this. stuck figuring out how implement m3 in other words, how can create dom object have created interactive? consider image below. have 5 mock scenarios. m1 basic situation. click on shelf , can see representation of 3 x 5 shelf. m2 reddish represents occupied position on book shelf. want utilize database info , how show user. m3 greenish represents user wants select. assuming on tablet. them able drag figure across screen. m4 scenario isn't of import right (checking out everyt...