Posts

Showing posts from June, 2010

Can't find the workflow source code of a list or library on SharePoint Designer -

i'm new using sharepoint. having trouble find code or workflow structure of list or library. in left menu can see "workflows" button workflows not there. there workflow section in "list , libraries" view showing running workflows in these list, when click on 1 of them move me settings in browser , no structure or code i'm looking for. is there way find code or structure of running workflows? pd: working in place of previous developer build entire site, however, didn't show me about. thanks. if these workflows created using sharepoint designer then: open sharepoint designer open site click on lists , libraries click on list name there heading titled "workflows" click on workflow wanting at click "edit workflow" view it go there if wanting see status of workflow in regards item: go list i recommend creating personal view (so see it) you can select fields interested in , each workflow should have c...

SQL Server CE Toolbox Performance -

when run db query application using sql server ce 4.0 dlls, takes 5 times longer return results if run same query on same database using sql server ce toolbox plugin vs2010. does know i'm doing wrong? the query like: select * column1 > '' , column2 < '' , column3 in (14) the database file quite large @ ~600 mb , table query run against has more 3 million rows in it. all 3 of columns used in query above indexed. the query returns 5000 rows. here query performance numbers: my code: 1 second sql server ce toolbox: 0.188 seconds in c++ code, using atl/oledb access database: ccommand<cdynamicparameteraccessorex> cmd; hresult hr = videoscmd.create(dbsession, querystmt.c_str()); void* pdummy; // bind parameters. hr = cmd.bindparameters (/* can't show args here because of weirdness */); // set second parameter- start time dbtimestamp dbstart; tzlocaltimetoutc(startlocal, &start_utc); converttime(start_utc, ...

list - When to use an Erlang record instead of a tuple? -

when should use erlang record instead of tuple? or, visa-versa, when erlang record unnecessary? relatively new erlang , not sure if using records , tuples properly. understand have read records stored tuples behind scenes. i typically use records pieces of data going passed around application or persisted somewhere. use tuples things return value of function, params of function, , things specific body of function. am using records , tuples correctly? there documentation outlining when 1 type should used on another? it style question. note: tuples of large arity hard correct , swap values. record names each field making swaps less likely. you can match on record subset of fields. a record needs same arity. such bad emulating sum types. records not shared on modules leads lots of .hrl files include statements if used between modules. breaks abstraction. records can kept module-local make harder others use record. improves modularity.

Problems with the Google API PHP simple-query example -

i trying google simple-query example (off github) working, unfortunately definite lack of success ... exit code of 255. i established problem in call google server, added exception handler code. program looks this: <?php /* * copyright 2013 google inc. * * licensed under apache license, version 2.0 (the "license"); * may not use file except in compliance license. * may obtain copy of license @ * * http://www.apache.org/licenses/license-2.0 * * unless required applicable law or agreed in writing, software * distributed under license distributed on "as is" basis, * without warranties or conditions of kind, either express or implied. * see license specific language governing permissions , * limitations under license. */ include_once "templates/base.php"; echo pageheader("simple api access"); /************************************************ make...

visual studio 2010 - ef power tools beta 4 not showing entityframework context menu -

Image
i have installed entity framework power tools beta 4 can't see entity framework in context menu after right clicking on project. i have visual studio 2013 web express edition installed. please advise if faced similar issue. thanks, krishna. here how can install power tools entity framework go tools--> extensions , updates click @ online tab type in search box entity framework power tools you here can download , install. after installing restart visual studio , can use it. check right click @ solution can see see entity framework in list displayed.

image processing - What should be the kernel size for deviation of 0.5 -

the implementation asked me remove noise applying gaussian blur ( sigma = 0.5 ), didn't mention kernel size. now, confused kernel size should use ? the gaussian formula has no actual endpoint, goes on infinity. it's determine point @ can cut off without affecting results. for image processing can cut off @ point formula reaches 1/256 or less. sigma of 0.5 1.4833; since kernel coordinates whole numbers means can truncate 1. means kernel has go +/- 1 center, or 3x3.

ruby - how to display twitter user feed in rails with twitter gem -

im using twitter gem rails try , show 3 statuses twitter feed. i'm doing per documentation not displaying in view. in application controller i've got down: client = twitter::rest::client.new |config| config.consumer_key = "***********" config.consumer_secret = "***********" config.access_token = "***********" config.access_token_secret = "***********" end def client.get_all_tweets(user) options = {:count => 3, :include_rts => true} user_timeline(user, options) end @tweet_news = client.get_all_tweets("tezzataz") then in view have put: <% @tweet_news %> i don't errors have nothing showing in view. appreciated! used same purpose. <ul> <% @tweet_news.each |f| %> <li> <%= f.text%> <span><%= time_ago_in_words(f.created_at) %> ago</span> </li> <% end %> </ul>

visual studio 2013 - How t solve "HTTP Error 500.19 - Internal Server Error" in VS'13 -

Image
i running application in visual studio 2013 , entity framework used microsoft sql server management studio 2012 . alright beginning when used command using htmlhelpers inside project time got error [error code 0x80070032 ]:- my web config code:- <system.web.webpages.razor> <host factorytype="system.web.mvc.mvcwebrazorhostfactory,system.web.mvc, version=5.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35" /> <pages pagebasetype="system.web.mvc.webviewpage"> <namespaces> <add namespace="system.web.mvc" /> <add namespace="system.web.mvc.ajax" /> <add namespace="system.web.mvc.html" /> <add namespace="system.web.routing" /> <add namespace="sportsstore.webui" /> <add namespace="sportsstore.webui.htmlhelpers"/> </namespaces> </pages> </system.web.webpages.razor> i try project given...

dom - PHP DomXPath to find nested element value -

i'm using php dom extract data page , having hard time getting href value nested element using domxpath. here's html: <span class="myclass"> <a href="/relative/path">my value</a> <span class="otherclass"></span> </span> and here's xpath query: $xpath = new domxpath($dom); $classname = "myclass"; $nodes = $xpath->query("//span[contains(@class, '$classname')]"); foreach ($nodes $node){ echo $node->nodevalue; echo ","; echo $node->getattribute('href'); echo "<br>"; } i'm able nodevalue fine ('my value'), not value of href. i'm sure i'm missing , not understanding this. need separate query href value? what's best way this? in loop, $node span because xpath selecting span elements given class, that's why doesn't have href . if want select anchor under span, chang...

c++ - strange failure using stringstream to read a float value -

i have following simple code reads float value (double) using c++ stringstream . use stringstream::good detect whether read successful. strangely, value read float variable, good() returns false. code @ bottom returns: failed: 3.14159 i compiled code using gcc 4.8.1 under mingw32, g++ -std=c++11 test.cpp . any idea why read not good ? , what's proper way tell float read successfully? thanks #include <sstream> #include <iostream> using namespace std; void readfloat(string s) { double = 0!; stringstream ss(s); ss >> i; if (ss.good()) cout << "read: " << << endl; else cout << "failed: " << << endl; } main() { readfloat("3.14159"); } when streams reach end of stream during extraction, set std::ios_base::eofbit in stream state alert user no more characters can read. means good() no longer returns true until stream state cleared. generally, good() not r...

Can't map a Query String parameters to my JavaBean (using Spring 4 and Datatables) -

i'm stuck trying map querystring parameters spring javabean command object here, , couldn't find answer question far. i'm using jquery datatables plugin server side processing each action in datatable, triggers ajax request spring application. this parameters datatable plugin sending rest service: http://localhost:8080/relatorios/produtos-source?draw=2&columns[0][data]=nome&columns[0][name]=&columns[0][searchable]=true&columns[0][orderable]=true&columns[0][search][value]=&columns[0][search][regex]=false&columns[1][data]=nomesalternativos&columns[1][name]=&columns[1][searchable]=true&columns[1][orderable]=true&columns[1][search][value]=&columns[1][search][regex]=false&order[0][column]=2&order[0][dir]=asc&start=0&length=10&search[value]=ss&search[regex]=false&_=1400248561282 this how receiving in spring controller: @requestmapping(value = "/produtos-source", method = requestme...

jsf - Prime faces Export data not working -

i tried export data datatable when press pdf button example refresh page without export <h:commandlink > <p:graphicimage value="/images/excel.png" /> <p:dataexporter type="xls" target="datatable" filename="alarms" /> </h:commandlink> <h:commandlink > <p:graphicimage value="/images/pdf.png" /> <p:dataexporter type="pdf" target="datatable" filename="alarms"/> </h:commandlink> <h:commandlink > <p:graphicimage value="/images/csv.png" /> <p:dataexporter type="csv" target="datatable" filename="alarms" /> </h:commandlink> <p:commandlink> has surrounded <h:form> tag work. if not problem can please provide source code of whole page , primefaces version working with?

javascript - Refused to get unsafe header "ETag" -

i'm using azure mobile service version "mobileservices.web-1.1.5.min.js" , when update table in database im getting error on debug console ("chrome") > refused unsafe header "etag" mobileservices.web-1.1.5.min.js:2 > getitemfromresponse mobileservices.web-1.1.5.min.js:2 (anonymous > function) mobileservices.web-1.1.5.min.js:2 c > mobileservices.web-1.1.5.min.js:2 (anonymous function) > azureservice.js?bust=1400282269337:10 r.onreadystatechange this did not happened older version of mobileservices. how correct this? thanks in advance. the short answer can't correct it. this error browser implementation dependent , can safely ignore it. has cors configuration in mobile services. when update table completes successfully, mobileservices sends updated object in response. 1 of response headers "etag" browsers/versions mistakenly identify dangerous. far know there nothing can make console error go away via ...

Better Understanding Java Concepts : File , Exception Handling -

i want build data structure store files file-system. have class directorynode: class directorynode{ private string name; private string path; file file; //this list stores sub-directories of given directory. private list<directorynode> subdirectories = new arraylist<directorynode>(); //this list stores simple files of given directory private list<string> filenames = new arraylist<string>(); //the default constructor. directorynode(file directoryname){ this.name = directoryname.getname(); this.path = directoryname.getpath(); this.file = directoryname; //a function build directory. builddirectory(); } file[] filesfromthisdirectory; private void builddirectory(){ //get files directory filesfromthisdirectory = file.listfiles(); try{ for(int = 0 ; < filesfromthisdirectory.length ; i++){ if(filesfromthisdirectory[i...

java - JLabel is not showing -

i'm trying give jlabel in next line, nothing happening output shows nothing blank line when run code: main class: import javax.swing.jframe; public class main { public static void main(string[] args){ test piyu=new test(); piyu.setdefaultcloseoperation(jframe.exit_on_close); piyu.setsize(300,200); piyu.setvisible(true); } } test class: import java.awt.*; import javax.swing.*; public class test extends jframe { private jlabel item1,item2; public test() { super("first java app"); jpanel panel=new jpanel(); panel.setlayout(new gridlayout()); item1=new jlabel("my name xyz"); item2=new jlabel("yo"); item1.settooltiptext("game on"); panel.add(item1); panel.add(item2); } } you missing 1 line. never add jpanel jframe . class test extends jframe { private jlabel item1,item2; public test(){ ...

bash - 'tLooking to download AWS ELB logs from s3 and remove them -

i'm trying aws cli move files s3 ebs on ec2 instance. issue having there no "move' command in aws cli. make life easier if there was. from logic standpoint, need create script copies data s3 bucket (s3://bucket_name/awslogs/...) , removes file copied. know can set lifecycle pieces expire data, in case script copies data s3 ebs doesn't run, don't want lose data. the aws cli supports recursive copies , removes, need have type of command execute "aws s3 cp" command filename variable , execute "aws s3 rm" same filename. i've searched on , don't know of tool/script exists this. ianap, wouldn't know how move python boto script, hoping there easy way bash shell script. help. thanks. i'd suggest use s3cmd task. s3cmd based on boto , supports syncing directories / s3. in case have reliable sync , local path on machine executing s3cmd. for example: $ mkdir /home/user/logs/ $ s3cmd sync s3://org.example.mybucket/ /home...

python get all file descriptor opening with socket -

i use flask , flask's internal web server on unix based os. run like; app.run(host='', port=8000, threaded=true, debug=false) i restart serivces in code like service in active_services: command = "/etc/init.d/%s restart" % service # stdout , stderr string output of command stdout, stderr = popen(command, stdout=pipe, stderr=pipe,shell=true).communicate() when stop flask app, other services ,which restart, start listen 8000 port. caused file descriptors opening flask inherited subprocess. prevent problem try reach file descriptors of socket. how can that? for solving problem, gc can used getting creating object. after create , bind socket, can run code , socketobjects; for sock in filter(lambda x: type(x) == socket._socketobject, gc.get_objects()): fd = sock.fileno() old_flags = fcntl.fcntl(fd, fcntl.f_getfd) fcntl.fcntl(fd, fcntl.f_setfd, old_flags | fcntl.fd_cloexec) this code prevent inheritance of ...

cocos2d x - Cocos 2d-x 3.0 - How does scale9 stretching work? -

Image
in cocos2d.x 3.0, ui::button class has setscale9enabled method. doesn't seem work line old scale9sprite in extensions. i tried calling setscale9enabled(true) end image divided in 4, corners in wrong places. bottom right corner of source image in top left of rendered image, example. i tried calling setcapinsetsnormalrenderer(rect) various rects (size of image, middle third, etc) results unpredictable. don't forget set size of button. i tried image (160x160 pixel): with code: ui::button *button = ui::button::create(); button->setscale9enabled(true); button->loadtexturenormal("button.png"); button->setsize(size(300,160)); button->settitletext("button"); button->setposition(point(200,200)); addchild(button); and working expected.

c# - Copy XML into OutputDirectory of Other Project -

i run code in 1 c# project. file in root of project. ant has set copy output directory copy always. xdocument fileconfigxml = xdocument.load("fileconfig"); that project being invoked other project. i get: system.io.filenotfoundexception unhandled hresult=-2147024894 message=could not find file 'c:\users\user\solutionname\otherpriect\bin\debug\fileconfig.xml'. can copy xml file caller project or read form domestic project? the xml-file must in project executed program. otherwise copied output-folder of referenced project. reference project means, use .dlls not other files.

r - Draw mean and outlier points for box plots using ggplot2 -

Image
i trying plot outliers , mean point box plots in below using data available here . dataset has 3 different factors , 1 value column 3600 rows. while run below code shows mean point doesn't draw outliers properly ggplot(df, aes(x=representations, y=values, fill=methods)) + geom_boxplot() + facet_wrap(~metrics) + stat_summary(fun.y=mean, colour="black", geom="point", position=position_dodge(width=0.75)) + geom_point() + theme_bw() again, while modify code in below mean points disappear !! ggplot(df, aes(x=representations, y=values, colour=methods)) + geom_boxplot() + facet_wrap(~metrics) + stat_summary(fun.y=mean, colour="black", geom="point", position=position_dodge(width=0.75)) + geom_point() + theme_bw() in both of cases getting message: "ymax not defined: adjusting position using y instead" 3 times. any kind suggestions how fix it? draw mean points within individual box plots , show outl...

Is it possible to use parse.com pointers with images across classes using JavaScript? -

using parse.com , javascript sdk. i've image stored in "_user" class. i have class called "links" each user have multiple records stored in links class. when querying links class want able access image stored against user. do use pointer of relationship this? or achieve using query? just looking direction, maybe code example if available. "each user has many rows in 'links' " "image store in _user" sounds should have same pointer-to-user-image value available on 2 access paths. getting _user includes link file image of user. getting links rows user ( includes independent link same image ) note logged in user have ref _user anytime logged in have reference img-link logged in user. note if logged on "a" , query _user(b) rows in 'links' ( assuming have access them ) have pointer user a's image in results. if 2 , independent access paths want provide same pointer in both classe...

.net - calculation compile issue with c# timer -

i have windows form label, , system.net timer called atimer . the timer created in external class this: // create timer 3 minute interval. common.atimer = new system.timers.timer(3000); // hook elapsed event timer. common.atimer.elapsed += new elapsedeventhandler(ontimedevent); // set interval 3 minutes (180000 milliseconds). common.atimer.interval = 180000; // 3000; // common.atimer.enabled = true; mtimerrunning = true; and in form run code ontimedevent kick off background worker i want show on label number of seconds before next action taken. i tried won't compile: lblstatus.begininvoke(new action(() => { lblstatus.text = "timer running - check inbox in " & common.atimer.interval - common.atimer.elapsed & " seconds!"; })); i have compile error the event 'system.timers.timer.elapsed' can appear on left hand side of += or -= so correct way this? ideally every tick of t...

python - Scipy not solving integral with big numbers -

here simple code i'm trying run: from scipy.integrate import quad def integrand1(p, n, x, e, s): return (p**(x+1))*((1-p)**(n-x)) def integrand2(p, n, x, e, s): return (p**(x))*((1-p)**(n-x)) e = 0.789 s = 0.733 n = 8928 # number big compute. if change 89 works. x = 2325 # number big compute. if change 23 works. i1 = quad(integrand1, 1-e, s, args=(n,x,e,s)) i2 = quad(integrand2, 1-e, s, args=(n,x,e,s)) = i1[0]/i2[0] print it basically, division between 2 integrals. works fine values of "n" , "x" hundreds. after that, in thousands , tens of thousands, result starts go zero, witch not expected. since there lot of powers, guess there overflow somewhere, since there no message, can't discover wrong. have clue on may wrong? thanks

android - get a MapView from SupportMapFragment -

i have activity_main xml layout looks like: <?xml version="1.0" encoding="utf-8"?> <fragment xmlns:android="http://schemas.android.com/apk/res/android" xmlns:map="http://schemas.android.com/apk/res-auto" android:id="@+id/map" android:layout_width="fill_parent" android:layout_height="fill_parent" class="com.google.android.gms.maps.supportmapfragment" /> can in mainactivity mapview xml layout? you can this googlemap mmap = ((supportmapfragment) getfragmentmanager() .findfragmentbyid(r.id.map)).getmap();

java - Android How to disable pattern lock -

i want disable screen lock. show screen , after dismissing it, want lock screen again, purpose using code. after oncreate() powermanager pm = (powermanager) this.getsystemservice(context.power_service); wakelock = pm.newwakelock(powermanager.full_wake_lock | powermanager.acquire_causes_wakeup | powermanager.on_after_release, "info"); keyguardmanager km = (keyguardmanager) this.getsystemservice(context.keyguard_service); kl = km .newkeyguardlock("mykeyguardlock"); kl.disablekeyguard(); and on dismissing screen using, kl.reenablekeyguard() lock screen again. this working absolutely great if using swipe screen lock, if using pattern lock, code not working. know possible, there apps doing this, far unable find way out. edit : found code working in nexus, not on galaxy you create activity start when needed with: protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); this.getwin...

c++ - Why is this while loop not behaving as I expect? -

the problem while loop isn't exiting if user has entered correct name format if first input entered incorrectly. problem doesn't occur when user enters name correctly first time. void inputclass::validatename(string name) { bool flag = true while (flag == true) { (int i=0; < name.length(); i++) { if (name[i] != ' ') { if (!isalpha(name[i])) { cout << "you have entered incorrectly. please try again. " << endl; setname(); } else if (i == name.length()-1) { cout << "welcome " << name << endl; flag = false; //break out of while loop } } } } } void inputclass::setname() { string name; cout << "please enter name: " << endl; getline(cin, name); validatename(name); } you seem have di...

i need help creating a password form in html/javascript -

i trying make password field , not working, if knew wrong with code (probably because second project) grateful. <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>password</title> <script> (function pw_check() { var $password; $password = document.write(document.getelementbyid("password")); if ($password = "pass") {window.open("alert.html");} else {window.open("pwfail.html");}; }); </script> <meta name="viewport" content="width=device-width; initial-scale=1.0"> </head> <body> <form> <input type="password"/> <button onclick="pw_check" id="password">submit</button> </form> </body> </html> two problems: onclick=...

Selecting a particular tag using Jsoup -

<table class="striped"> <tbody> <tr><td><img src="images/google.png"/>&nbsp;google indexed pages</td><td class="right">613000000</td></tr> <tr><td><img src="images/dmoz.png"/>&nbsp;dmoz directory listed</td><td class="right">yes</td></tr> <tr><td><img src="images/pagerank.png"/>&nbsp;google page rank</td><td class="right">9/10</td></tr> </tbody> </table> i want extract google rank value i.e 9/10 using jsoup. this code have written till now element tbody = doc.select("tbody>tr>td>img[src=images/pagerank.png]").first(); how move next tag after ? what mean move next tag? next google page rank tag? the select method of document tag returns elements object implementation of list. iterate throught next elem...

java - Crawler4j crawl jquery live content -

i have website on category page , product list generated after page loaded via javascript. , crawler goes , couldnt find product. how can solve problem ? crawlconfig config = new crawlconfig(); config.setcrawlstoragefolder(rootfolder); config.setmaxpagestofetch(100000000); config.setmaxdepthofcrawling(-1); config.setpolitenessdelay(1); config.setuseragentstring("mozilla/5.0 (windows nt 6.1; wow64) applewebkit/537.36 (khtml, gecko) chrome/33.0.1750.146 safari/537.36"); //config.setresumablecrawling(true); config.setincludehttpspages(true); pagefetcher pagefetcher = new pagefetcher(config); robotstxtconfig robotstxtconfig = new robotstxtconfig(); robotstxtconfig.setenabled(false); robotstxtserver robotstxtserver = new robotstxtserver(robotstxtconfig, pagefetcher); crawlcontroller controller = new crawlcontroller(config, pagefetcher, robotstxtserver); contr...

ios - TextField not showing on a view that has table on top and textfield at bottom -

Image
i have view table on top , textfield @ bottom. kind of chat. envision when user types in textfield , presses send button (not shown in screenshot) table update entry. question my problem when click textfield , keyboard shows textfield isn't visible. shown in screen shot below. this how i'm making 2 views: @my_table = rmq(self.view).append(uitableview, :top_style).get @bottom = rmq(self.view).append(uiview, :bottom_style).get @bottom = rmq(:bottom_style) @send = @bottom.append(uitextfield, :send).get stylesheet def top_style(st) st.frame = {t: 0, l: 0, w: screen_width, h: screen_height - 100} st.background_color = color.white end def bottom_style(st) st.frame = {t: screen_height-100, l: 0, w: screen_width, h: screen_height} st.background_color = color.battleship_gray end def send(st) st.frame = {l: 3, t: 5, w: 220, h: 30} st.background_color = color.white st.view.font = font.small st.layer.cornerradius = 5 st....

lucene.net - Getting no results by NumericRangeQuery in Lucene -

i using below code creating index on listingid lucene.net.documents.document doc = new lucene.net.documents.document(); numericfield numberfield = new numericfield("listing_id", field.store.yes, true); numberfield.setdoublevalue(fieldnumber);// .setdoublevalue(15, 25, 21, 51, etc. ); // here fieldnumber getting database doc.add(numberfield); this code using in search: string indexfilelocation = server.mappath("~/searchindex/"); lucene.net.store.directory dir = lucene.net.store.fsdirectory.getdirectory(indexfilelocation,false); indexsearcher indexsearcher = new indexsearcher(dir,true); numericrangequery query = numericrangequery.newdoublerange("listing_id", 1, 6, true, true); var hits = indexsearcher.search(query); but getting no results in search.

perl - dist zilla cannot release because of untracked git changes -

i'm using dist::zilla release module, not working. i'm using dist::zilla::plugin::git plugin , whenever dzil release , won't let me release module because says have untracked changes. however, untracked changes new files dist::zilla has created release! here config file: name = my::module author = name license = perl_5 copyright_holder = name copyright_year = 2014 version = 0.001 [nextrelease] [@git] [@basic] [podweaver] [testrelease] [confirmrelease] [uploadtocpan] [autoprereqs] is in wrong order here? or supposed commit created files release? because thought supposed temporary. here output get: [@git/check] branch master has untracked files: [@git/check] my-module-0.001.tar.gz [@git/check] my-module-0.001/changes [@git/check] my-module-0.001/license [@git/check] my-module-0.001/manifest [@git/check] my-module-0.001/meta.yml [@git/check] my-module-0.001/makefile.pl [@git/check] my-module-0.001/readme [@git/check] my-module-0.0...

openrefine - Keep newest duplicate row depending on multiple Columns -

i seem have workflow problem open refine ( google refine 2.5 [r2407] ) sophisticated duplicate row cleaning. have found far how delete duplicate rows based on single column . my aim delete duplicate rows based on multiple columns , @ best, in specific hierarchy. example given following dummy data in refine +----+---------+---------+--------+------------+------+-----------------------------------+ | id | timeago | title | author | date | val1 | [after refine, keep record] | +----+---------+---------+--------+------------+------+-----------------------------------+ | 1 | 10 | faust | mr. | 2014-01-15 | 10 | ->b, older entry | | 2 | 11 | faust | mr. | 2014-01-21 | 10 | (because of date) | | 3 | 8 | faust | mr. | 2014-01-15 | 10 | b | | 4 | 8 | redhead | mr. b | 2014-01-21 | 34 | ->d, older entry | | 5 | 7 | redhead | mr. b | 20...

c# - Does Forms authentication remember authentication? -

Image
preview: in web.config - don't use forms authentication. set forms cookie myself. however - see code : /*1*/ protected void application_authenticaterequest(object sender, eventargs e) /*2*/ { /*3*/ if (httpcontext.current.user != null) /*4*/ { /*5*/ if (httpcontext.current.user.identity.isauthenticated) /*6*/ { /*7*/ //... /*8*/ httpcontext.current.user = .... /*9*/ //... /*10*/ } /*11*/ } /*12*/ } looking @ line #5 — how can ever authenticated if line#8 set authentication ? i mean - line #8 1 set authentication specific request , when request finished , there no "memory" future requests. ( cookie expiration merely - how long keep persistent cookie). question in scenarios line #5 return true ? in scenarios line #3 null ? nb , question assumes begin_request event not setting , , stage authentication set on application_authenticaterequest . — don'...

python - Application Loader: error when creating a .pkg file using productbuild -

i testing command "productbuild" archive application bundle cemhapp. idea submit built .pkg file mac app store. @ moment, having following problem: when try run basic command: productbuild --component "cemhapp.app" /applications cemhapp.pkg i following error message: productbuild: error: component @ "cemhapp.app" not bundle. i tried command "pkgbuild", i.e. pkgbuild --component cemhapp.app --version 1 --install-location /applications cemhapp.pkg but following error appears pkgbuild: adding component @ /users/wilsondasilva/desktop/aplk/cemhapp.app pkgbuild: error: path "/users/wilsondasilva/desktop/aplk/cemhapp.app" not valid bundle component (using destination path "/users/wilsondasilva/desktop/aplk") the strange thing cemhapp.app file works runs charm, not understand why system gives me above presented error. can shed light on topic , give me guidance? the cemhapp open-source free application developed...

Unicode characters in Windows command line - how? -

we have project in team foundation server (tfs) has non-english character (Å¡) in it. when trying script few build-related things we've stumbled upon problem - can't pass Å¡ letter command-line tools. command prompt or not else messes up, , tf.exe utility can't find specified project. i've tried different formats .bat file (ansi, utf-8 , without bom ) scripting in javascript (which unicode inherently) - no luck. how execute program , pass unicode command line? try: chcp 65001 which change code page utf-8. also, need use lucida console fonts.

java - Reading Button Names from a File -

i have 3 buttons , need set names reading file. here's have far: bufferedreader inputfile = new bufferedreader (new filereader ("buttonnames.txt")); string buttonname = ""; int startline = 1; int endline = 3; (int = startline; < endline + 1; i++) { buttonname = inputfile.readline(); } button1 = new jbutton(buttonname); buttonpanel.add(button1, borderlayout.line_start); this set button name last line in file. how set button1's name first line, button2's second line, etc. i'm thinking need use array, i'm not sure how implement that. put code @ bottom inside of loop. for (int = startline; < endline + 1; i++) { buttonname = inputfile.readline(); button1 = new jbutton(buttonname); buttonpanel.add(button1, borderlayout.line_start); }

android - E/AndroidRuntime(1549): java.lang.RuntimeException: Unable to start activity ComponentInfo: -

here modified code: but, still getting same error. please help, doing wrong. public class mainactivity extends actionbaractivity { int counter; button addone; button subone; textview display; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); addone=(button) findviewbyid(r.id.badd); subone= (button) findviewbyid(r.id.bsub); display =(textview) findviewbyid(r.id.tv1); counter=0; addone.setonclicklistener(new view.onclicklistener() { @override public void onclick(view arg0) { // todo auto-generated method stub counter++; display.settext("counter is"+ counter); } }); subone.setonclicklistener(new view.onclicklistener() { @override public void onclick(view arg0) { // todo auto-generated method stub counter--; display.settext("counter ...

algorithm - Variation of n-queens -

you given nxm matrix. have k battle ships. given 3 parameters each of battle ship - rowattack, columnattack , diagonalattack. each telling how many cells in row/column/diagonal(on each direction) ship can attack. task find whether ships can placed in board such no 1 attacks each other. to shed more light on attacks, if ship placed @ (5,5) , if it's column attack range 3, can attack ship (5,2) (5,8). if no such combination possible, return false. sample java class... class battleship { public final int rowattack; public final int columnattack; public final int diagonalattack; } and need code boolean ispossible(int m, int n, battleship battleships[]) where m number of rows in board, n number of columns in board , battleships.length k , k irrelevant both m , n . (so 1 obvious checks check if k >= m x n). i couldn't think of solution other examining every possibility go upto o(m x n x k!) it's not explicit in description, since...

apache - virtual hosts WAMP server -

i trying setup virtual wamp localhost. localhost root folder: c:\wamp\www mysite.local root folder: c:\wamp\site2 steps of every kind taken: removing # file "httpd.conf" #include conf/extra/httpd-vhosts.conf addition in httpd-vhosts.conf: <virtualhost *:80> serveradmin webmaster@localhost documentroot "c:/wamp/www" servername localhost errorlog "logs/localhost-error.log" customlog "logs/localhost-access.log" common </virtualhost> <virtualhost *:80> documentroot "c:/wamp/site2" servername mysite.local <directory "c:/wamp/site2"> options indexes followsymlinks allowoverride order deny,allow deny allow 127.0.0.1 </directory> </virtualhost> addition in hosts file: 127.0.0.1 mysite.local problem is, in either case www root folder through localhost or mysite.local. solution? //httpd.conf >loadmodule vhost_alias_module modules/mod_vhost_...

web - When I type a URL in the address bar, then why does it always use "HTTP" and not some other protocol -

i want understand http protocol in depth. know can find relevant material http. few questions have in particular are: why when press enter after typing eg. "google.com" gets translated " http://www.google.com " , not " ftp://www.google.com " or else. how http request gets transferred server, routing algorithm uses decide server used, , inside server locate uniform resource". any pointers in direction welcome!! because http web standard requests. agreed on using when web started, , stuck (whether or not). http stands 'hypertext transfer protocol' , in fact way how exchange information see on display when browsing. ftp, , numerous other protocols their standards (or in general methods) purpose. http serves purpose of communicating between client , server web. and how http works internally, well, wrote few books on it. standard described ietf: hypertext transfer protocol -- http/1.1 .

java - Play framework: Why the cookie isn't showing -

i'm trying set simple cookie domain seems doesn't added browser's cookie store. here's how added cookie response().setcookie("clientauthtoken", "asdasd", 5000, "/test", "test.com", false, false); and if check in cookie manager (a plugin firefox manage cookies) doesn't show cookie added. if check in session, yes it's there (play.mvc.http.cookie cockie: response().cookies()) { logger.info(" name " + cockie.name()); logger.info(" value " + cockie.value()); logger.info(" domain " + cockie.domain()); } this happens if added domain (test.com). if set domain null or empty string , try add cookie again, showing both browser's cookie store , in session. i'm missing here? or not possible add cookie domain. thanks. if you're adding cookie domain, can't test when browsing localhost . need in order test edit hosts settings of os (f...

asp.net - How to find memory used each switch case -

i have switch include many case example many data database. switch(number) { case: "1" { getdata1(); } case: "2" { getdata2(); } case: "3" { getdata3(); } } now,i want find memory used each case , show user. thanks.

simulation - How to write a .sdf file in Gazebo 3D simulator for a robot arm with 3 revolute joints? -

something similar crs arm robot 3 revolute joints. having trouble writing sdf(simulator description format) arm in gazebo. in case havent read it, sdf manual description of each tag: http://gazebosim.org/sdf/1.5.html . if don't succeed in writing sdf scratch, maybe can find description file written in other format (eg urdf) , convert tools.

What does the second parenthesis for the javascript pseudo protocol used in bookmarklet code, signify? -

a bookmarklet has code in following pattern - javascript:(function(){})() what second parenthesis signify? please explain in context of snippet - javascript: (function (d, w, f, t, e) { t = (e = w.elp$ || 0) ? clearinterval(e, d.title = odt, elp$ = 0) && 0 : f(w.elp$ = setinterval(function () { d.title = (new date(f() - t)).toisostring().substr(11, 8) }, 40), w.odt = d.title) })(document, window, function () { return (new date()) | 0 }); the second set of parantheses used call function defined. in case of second snippet, calls function , passes in parameters document, window , new function defines.

ios - Why is child view controller occupies the entire screen? -

Image
i'm trying learn how make child view controller , face problem: child view controller made unknown reasuns occupies whole screen instead of view add it. here super-simple code: cvcchildviewcontroller *childviewcontroller = [[self storyboard] instantiateviewcontrollerwithidentifier:kvcidentifier]; [self addchildviewcontroller:childviewcontroller]; [self.childview addsubview:childviewcontroller.view]; [childviewcontroller didmovetoparentviewcontroller:self]; and here storyboard screen: white uiview (childview) subview of self.view. , wand child view controller not cross childview bounds. how this? set childviewcontroller.view.bounds = self.childview.bounds before add subview. need set frame of childviewcontrollers view before adding subview , else take default height. hope helps. cheers

Compare lists in Prolog -

i need compare list fact includes list. example have 2 facts: level1(toothed_whale,[1,2]). level1(baleen_whale,[2,1]). i want create predicate compares these facts list of creation. if compare level1 list [1,2] want function return toothed_whale . if compare level1 list [2,1] should return baleen_whale . how do this? i'm not sure you're asking, can execute simple queries. for instance: 2 ?- level1(x,[1,2]). x = toothed_whale . 3 ?- level1(x,[2,1]). x = baleen_whale. is you're asking?

asp.net - How to create a table with header using append jquery function? -

i have created table , getting data want header in table.kindly me out. my code <script type="text/javascript"> function pageload(sender, args) { $(function () { $("#<%=txtcu.clientid %>").autocomplete({ source: function (request, response) { $.ajax({ url: '<%=resolveurl("~/webservice.asmx/getcus") %>', data: "{ 'prefix': '" + request.term + "'}", datatype: "json", type: "post", async: false, mustmatch: true, contenttype: "application/json; charset=utf-8", success: function (data) { response($.map(data.d, function (item) { return { ...

javascript - Angular: obtain cause of a $watch to be triggered -

a short question: in angular, there way whatsoever obtain "root cause" of $watch triggered? let's have following javascript code: $scope.$watch("foo", function(value){ // here i'd know if change triggered // due change in ngmodel or through ngclick }; $scope.changefoo = function(){ $scope.foo = "bar" }; and html: <input ng-model="foo"> <button ng-click="changefoo()">change foo > bar</button> in $watch i'd know caused fired. in case, change in ngmodel or value changed in function of ngclick ? no, there no way current implementation. $watch triggered running function called $apply . function doesn't know triggered it. you going need perspective fix problem.

java - Logic Architectural Model: references for further understanding? -

Image
i having trouble understanding logical architectural model , how relates service orientated architecture . e.g: i not general principle behind , how each of services connect (i.e. talk 1 another). have links/resources understanding this? the link have found far ibm website has not been help. i confused physical architecture model of soa works? , main components are? the best place find you're looking reading ibm soa foundation: architectural introduction whitepaper ibm. excellent resource understand patterns: soa foundation service creation scenario . i try explain of boxes, maybe in over-simplified way: interaction services presentation logic , allowing user access solution. typical component in layer portal application, in ibm world means ibm websphere portal solution. process services services in charge of composing logic, , ibm-way through business process flows deployed on ibm websphere process server. business application services busin...

How to modify the HTML generated by Rails form helper -

i want structure: <label for="form-field-1" class="col-sm-3 control-label no-padding-right">text field</label> <div class="col-sm-9"> <div class="input string optional url_command_model_name"><input type="text" name="url_command[model_name]" id="url_command_model_name" class="string optional"></div> </div> but when use = f.input :model_name , html: <div class="input string optional url_command_model_name"> <label for="url_command_model_name" class="string optional control-label">model name</label> <input type="text" name="url_command[model_name]" id="url_command_model_name" class="string optional"> </div>

shell - Assigning space to variables in Unix -

suppose if want print 3 variables variables var1="123" var2=" " var3="456" echo $var1$var2$var3 the result got executing command 123 456 ; wanting 3 spaces rather single space. kindly suggest technique print it. use double quotes: echo "$var1$var2$var3" many problems resolved using double quotes.

r - I would like to apply msmFit function to each day of minutely time series. How could I build a list of 'lm' class object? -

i have 3 months time series minutely data , need perform msmfit function each day. function comes 'mswm package'. time series xts object. i split data 'split' function in way: us.data.daily<-split(us.data2,"days") the results 'list' object 91 1 elements. 'msmfit' requires 'lm' object input used 'lapply' , 'lm' functions 'us.data.daily' data in way: mod<-lapply(us.data.daily,function(x) lm(spread~volatility,data=as.data.frame(x),na.action=na.exclude)) now apply msmfit each element of 'mod' list, here code: mod_mswm<-lapply(mod,function(x) msmfit(mod,k=2,p=0,sw=c(t,t,t),control=list(parallel=f))) it returns error message: error in (function (classes, fdef, mtable) : unable find inherited method function ‘msmfit’ signature ‘"list", "numeric", "logical", "numeric", "missing", "missing"’ i supposing problem list ...

JDE WCF service -

is there simple way in can create jde provider bssv service in wcf service? requirement need third party runs on microsoft platform. entry in third party needs consume jde web service create record in jde , process same in jde , send data third party. client requires wcf web service. is there way create jde web service , host wcf service? has implemented such wcf service in past? can create wcf service using jdeveloper on jde. have advance document can demonstrate step step process follow. have referred document on oracle kt(doc id 1340777.1) not mcuh

javascript - Convert String containing list of JSON objects to Object Array -

a string contains list of objects serialized in json format, how convert list of json objects given in example below preferably without using jquery. eval, stringyfy json.parse etc dont seems here. [ {firstname: 'laurent', lastname: 'renard', birthdate: new date('1987-05-21'), balance: 102, email: 'whatever@gmail.com'}, {firstname: 'blandine', lastname: 'faivre', birthdate: new date('1987-04-25'), balance: -2323.22, email: 'oufblandou@gmail.com'}, {firstname: 'francoise', lastname: 'frere', birthdate: new date('1955-08-27'), balance: 42343, email: 'raymondef@gmail.com'} ]; update:- json string [ {"attributes":{"type":"contact","url":"/services/data/v30.0/sobjects/contact/0039000000wvt6yaaa"},"name":"stella pavlova","phone":"(212) 842-5500","createddat...