Posts

Showing posts from February, 2012

Swift crashing with two core data entities -

Swift crashing with two core data entities - i have app set core info , 1 entity named "subject", when seek add together entity core info called "homework", app crashes , error 2014-10-04 12:41:05.302 homejournal[1050:20160] unresolved error optional(error domain=your_error_domain code=9999 "failed initialize application's saved data" userinfo=0x7fe6bb60cac0 {nslocalizedfailurereason=there error creating or loading application's saved data., nslocalizeddescription=failed initialize application's saved data, nsunderlyingerror=0x7fe6bb524760 "the operation couldn’t completed. (cocoa error 134100.)"}), optional([nslocalizedfailurereason: there error creating or loading application's saved data., nslocalizeddescription: failed initialize application's saved data, nsunderlyingerror: error domain=nscocoaerrordomain code=134100 "the operation couldn’t completed. (cocoa error 134100.)" userinfo=0x7fe6bb5247

java - Sorting and Filtering in J2EE Application -

java - Sorting and Filtering in J2EE Application - i have been learning java web development while, , have pretty handle on servlets, jsp's, , familiar ajax/css/javascript. one thing have seen on lot of sites ability sort , filter list of items on webpage(items in storefront example). example, if i'm looking @ list of shoes, can filter , show ones available in size, , sort highest lowest price. i see ajax used in cases, question is, far end concerned, i'm assuming database isn't beingness queried every time sorting , filtering, of techniques accomplishing this? are objects stored in session, , when ajax phone call made, filtering parameters sent part of request, , servlet filtering , passes results? there pattern used this? it depends on dataset. little datasets, can, say, homecoming single json request client , filtering/sorting in javascript. for huge datasets, you'll allow server filtering , sorting, such you'd need transfer fraction

excel - REALLY SLOW Loop -

excel - REALLY SLOW Loop - can give me insight why takes long run? i'm running winxp on parallels, 16gb macbook pro (4 gigs allocated vm). spreadsheet (created client) absolute nightmare - 38 sheets total of ridiculously complicated formulae, , multi-step overly complex algorithms create rube goldberg quite jealous. still, simple routine takes 30 minutes run. sub onelist() 'application.screenupdating = false ncols = range("scores").columns.count nrows = range("sc_id").rows.count 'msgbox nrows, ncols redim preserve scores(1 nrows, 1 ncols) = 2 nrows j = 1 ncols scores(i, j) = application.index(range("scores"), i, j) ' debug.print i, j ' debug.print scores(i, j) ' sheet36.range("a1:d197").cells(i - 1, j).value = scores(i, j) next j next sheet36.range("a1:d197").clear = 1 nrows b = 1 ncols sheet36.range("a1:d197").cells(a, b).value = scores(a,

java - How to use UserGroupInformation with Kerberos WebHDFS -

java - How to use UserGroupInformation with Kerberos WebHDFS - following client code on non hadoop scheme perform actions on secured remote hdfs. configuration conf = new configuration(); conf.set("hadoop.security.authentication", "kerberos"); conf.set("java.security.krb5.conf",krbpath); conf.set("fs.defaultfs", "webhdfs://10.31.251.254:50070"); conf.set("fs.webhdfs.impl", org.apache.hadoop.hdfs.web.webhdfsfilesystem.class.getname()); conf.set("com.sun.security.auth.module.krb5loginmodule", "required"); conf.set("debug", "true"); conf.set("ticketcache", "dir:/etc/"); system.out.print("conf......"); usergroupinformation.setconfiguration(conf); usergroupinformation.loginuserfromkeytab("dummy@example.com", keytab); system.out.print("obtained......"); uri uri = uri.create("webhdfs://dummy:50070"); filesystem fs

Display specific data from CSV using PHP -

Display specific data from CSV using PHP - the code have below working narrow downwards results. @ moment shows info column 1 (date), 2 (name), , 3 (result). now, search csv word 'won' in column 3 , limit search 3 results. example, show latest 3 games have got word 'won' in column 3. $file_handle = fopen("future.csv", "r"); while (!feof($file_handle) ) { $line_of_text = fgetcsv($file_handle, 1024); print $line_of_text[1] . $line_of_text[2]. $line_of_text[3] . "<br />"; } fclose($file_handle); any help much appreciated. cheers. keep counter of how many times "won" shows up, , when it's 3/more stop looping. $file_handle = fopen("future.csv", "r"); $counter = 1; while (!feof($file_handle) ) { $line_of_text = fgetcsv($file_handle, 1024); if (strpos($line_of_text[3], 'won') !== false) { print $line_of_text[1] . $line_of_text[2]. $line_of_text[3] . &qu

How to limit the amount of requests per ip in Node.JS? -

How to limit the amount of requests per ip in Node.JS? - i'm trying think of way help minimize harm on node.js application if ever ddos attack. want limit requests per ip. want limit every ip address many requests per second. example: no ip address can exceed 10 requests every 3 seconds. so far have come this: http.createserver(req, res, function() { if(req.connection.remoteaddress ?????? ) { block ip 15 mins } } if want build @ app server level, have build info construction records each recent access particular ip address when new request arrives, can through history , see if has been doing many requests. if so, deny farther data. and, maintain info piling in server, you'd need sort of cleanup code gets rid of old access data. here's thought way (untested code illustrate idea): function accesslogger(n, t, blocktime) { this.qty = n; this.time = t; this.blocktime = blocktime; this.requests = {}; // sch

ddms - how save a folder with some sub folders and files in mnt->sdcard? -

ddms - how save a folder with some sub folders and files in mnt->sdcard? - i want save folder sub folders , files in mnt->sdcard on emulator ddms .i can save files 1 after other cant save many files @ time or cant save folder totally in sdcard because new android.i did searches can not doing job yet.what do? maybe this? file root = new file(environment .getexternalstoragedirectory()+"/myprivatefolder"); if(!root.exists()){ root.mkdir(); } else{ file[] files = root.listfiles(); //access files } file myfile = new file(environment .getexternalstoragedirectory()+"/myprivatefolder/myfile.txt"); myfile.createnewfile(); // creating file don ever hardcoe "/sdcard" or smth this. more convenient method of navigation each file has methods accessing abosulutepath, getting info file or folder or exists , other android-sdcard ddms

django - How do I regex {% anything here %}? -

django - How do I regex {% anything here %}? - i need regex (% %) e.g. want regex match {% %} or {% %} . you use \{\%(.*?)\%\} regex django

jQuery PrevAll() selector fail -

jQuery PrevAll() selector fail - i'm trying grab , display value of input when button clicked. class="snippet-code-js lang-js prettyprint-override"> $('.nextbtn').click(function() { alert($('this').prevall('input[type=tel]').val()) }) class="snippet-code-html lang-html prettyprint-override"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <div class="step" id="step1"> <h2>how old you?</h2> answer: <input type="tel" /> years old <button id="stepbtn1" class="nextbtn">next</button> </div> demo here: http://jsfiddle.net/r7c1skgg/11/ there's fundamental i'm not understanding here i'm sure, prevall doc doesn't seem spell reply (i'm sure it's obvious). try , alter solution without define id. problem quote in $(

What is the difference between .element( and .$( with protractor? -

What is the difference between .element( and .$( with protractor? - can explain me difference between these 2 ways of clicking protractor: element(by.repeater('calc in calculations').row(0)).$('#copycalc').click() or element(by.repeater('calc in calculations').row(0)).element(by.css('#copycalc')).click() quote protrator docs $: 'shortcut querying document straight css' source $ as far understand, $('.acssclass') , element(by.css('.acssclass')) same. source element protractor

php - missing values in table generated from database query -

php - missing values in table generated from database query - i created table in mysql 1 item in it, copied php page on site pulling database , tried modify pull 'gigs' table. it's not working , i'm close going insane :) here's php: <div class="span12"> <h3>view & manage gigs</h3> <table class="table table-striped"> <tr> <th>gig id</th> <th>gig name</th> <th>customer</th> <th>date</th> <th>fee</th> <th>status</th> <th>manage</th> </tr> <?php $cnt = orm::for_table('gigs')->where('gid', $cid)->count(); if ($cnt>0){ $items = orm::for_table('gigs')->raw_query($query)->find_many(); $i='0'; foreach ($items $item) { $i++; $gigid = $item['gigid']; $gig_name = $item['gig_name']; $gig_customer = $item['gig_

structure - Is it OK to have a C++ class with lots (lots!) of boolean fields? -

structure - Is it OK to have a C++ class with lots (lots!) of boolean fields? - i have c++ class lots of bool fields indicating different aspects of system. class part of class gets copied (a lot!). my questions: is ok have class lots of bools? or should manually compact larger info types? given class gets copied lot, there benefit in defining own copy/move constructors? or should leave lone , allow compiler optimize this? firstly, ok, assuming class not used instantiate huge number of objects. in latter case using whole bool represent boolean flag might prove wasteful. talking flags represent "different aspects of system", sounds not produce massive amounts of instances. secondly, maybe should consider converting these fields bool array indexed enum. example, instead of bool has_printer; bool needs_optimizations; use enum { opt_has_printer, opt_needs_optimization, opt_count_ }; bool options[opt_count_]; this create collection of

json - AngularJS extra data in request -

json - AngularJS extra data in request - i'm trying create function sends info form server. server sends id of created entry. id should sent server info field group. i've done similar jquery, in case wasn't able force id info "data2". it shows error "data2.push() not function". doing wrong? $scope.createnew = function() { var info = $scope.fields1; var data2 = $scope.fields2; $http.post("myurl", data) .success(function(response) { data2.push('rid' , response.id[0]); <------- add together id response sec request $http.post("myurl2", data2) .then(function(data) { $location.url('/entry/' + response.id[0]); }); }); } json angularjs post

angularjs - How to use angular ui select with valid markup -

angularjs - How to use angular ui select with valid markup - i want utilize angular ui select valid markup pass w3 validator instead of <ui-select> tag. how can that? there illustration here http://plnkr.co/edit/a3klk8dkh3wwiiksdsn2?p=preview possible have using <select> tag? it appears angular ui select source code hard-coded work non-standard elements. you modify source have work divs or similar. not possible, however, create work standard <select> elements, since browser , dom don't expose plenty customizable end points. angularjs angular-ui

Random generated inputs for Selenium builder scripts -

Random generated inputs for Selenium builder scripts - i'm trying have randomly generated inputs 1 of scripts on selenium builder illustration if run script regeneration on multiple browsers @ same time each release, run out of values future releases. looking random function help me create unique id every time seek run script. your help appreciated the next generate random strings numbers. can parse them java string methods generate whatever need. math.random().tostring() org.apache.commons.lang.randomstringutils.randomnumeric(4) selenium random

c++ - Nested arrays or nested 2D array? -

c++ - Nested arrays or nested 2D array? - i have created few headers each holds array , nested: pixelarray[17] within screenarray[10] within monitorarray[dynamic pointer] this because wanted test went along (not competent programmer long shot) after realised have merged pixelarray[17] , screenarray[10] single 2d array: pixelarray[10][17] within monitorarray[dynamic pointer] my question whether more efficient utilize single 2d array or not? managing 2d array requires more competance managing 1d array, 2d array more elegant have packaging in improve form, since have info grouping kept together c++ arrays performance

.net - Windows Forms Application and Azure SQL -

.net - Windows Forms Application and Azure SQL - i plan create windows forms application in visual basic 2010. utilize azure sql storing info because of possibility have access more places, no need have scheme administrator, think backup solutions , on. i have no experience creating web applications, that's why decided windows forms application. i know opinion, if big security risk , of problems can expect. illustration first problem is, wanted allow 1 country on firewall, reached limit 128 firewall rules , not plenty me. my sec question: if solution "windows forms application + remote database" ok, database recommend? thank much. .net winforms sql-azure

javascript - Inline event handler not working in JSFiddle -

javascript - Inline event handler not working in JSFiddle - i can't find out problem jsfiddle. html: <input type="button" value="test" onclick="test()"> javascript: function test(){alert("test");} and when click on button - nil happened. console says "test not defined" i've read jsfiddle documentation - there written, js code added <head> , html code added <body> . (so js code before html , should work) the function beingness defined within load handler , in different scope. @ellisbben notes in comments, can prepare explicitly defining on window object. better, yet, alter apply handler object unobtrusively: http://jsfiddle.net/pueue/ $('input[type=button]').click( function() { alert("test"); }); note applying handler way, instead of inline, keeps html clean. i'm using jquery, or without framework or using different framework, if like.

tfs - How does the test controller get the binaries to the agent during remote execution? -

tfs - How does the test controller get the binaries to the agent during remote execution? - i trying tests run via remote execution, , can't find documentation on how following: i understand when controller registered team project collection , agent runs through lab environment, build needs attached process - , makes perfect sense controller pulls dll contains tests build. however, not create sense me in more simplified scenario: i have test solution testsetting file, here define controller under roles. have 1 agent connected controller. in visual studio when run test, runs through controller -> delegates agent. have not setup build. i'm assuming visual studio pushes dll's controller when first run test. controller creates cache of dll's? guess. correct? i need know how internals work because have not yet got test run on remote controller. far after much headaches can scenario work when controller , agent , local dev environment located on same machin

functional programming - Haskell all valuations for variables given domain of values -

functional programming - Haskell all valuations for variables given domain of values - for assignment have create haskell function which, given list of (string, [integer]) (where integer list represents domain of values string) tuples gives possible combinations of strings , integers. so example, input valuations [ ("firstvar", [1..3]), ("secondvar", [1,2]) ] should yield: [ [("firstvar", 1), ("secondvar", 1)], [("firstvar", 1), ("secondvar", 2)], [("firstvar", 2), ("secondvar", 1)], [("firstvar", 2), ("secondvar", 2)], [("firstvar", 3), ("secondvar", 1)], [("firstvar", 3), ("secondvar", 2)] ] and should work n lists. far, i've made work 2 lists, i'm still having problem higher-order functions, hence confused how should create work n lists. how did 2 lists through function valuations: valuations :: (string, [integer]) -&

Python number game with changing feeback -

Python number game with changing feeback - user guesses 4 digit number , feedback needs 'f' if number right not in right place, 'x' if number not in number @ , if digit right , in right position displays digit. code below shows effort giving me error: expected str instance, list found from random import randint def check_char(a, b): #function making output display f, number , x depending on user input if == b: homecoming randomnumber #number displayed when correctly guessed elif b == randomnumber: homecoming 'f' #f means number somewhere in randomnumber elif b != randomnumber: homecoming 'x' #x means number in randomnumber guessestaken = 1 randomnumber = [str(randint(1, 9)) _ in range(4)] # create list of random nums print(randomnumber) while guessestaken < 10: guesses = list(input("guess number: ")) # create list of 4 digits check =

microcontroller - PIC18F2455 MPLab compile undefined identifier ANSEL and ANSELH -

microcontroller - PIC18F2455 MPLab compile undefined identifier ANSEL and ANSELH - i meet error when compiling code microchip microcontroller pic18f2455: #define hardware_setled(value) latbbits.latb5 = value ..... // disable analog pin functions, set led pin output ansel = 0; anselh = 0; trisbbits.trisb5 = 0; hardware_setled(0); .... the output said: error [192] c:\....\main.c; 320.1 undefined identifier "ansel" errpr [192] c:\....\main.c; 321.1 undefined indentifer "anselh" i guess, in pic18f2455 these registers not called "ansel" & "anselh"? actually, compile , not meet error on labtop. meet when compiling @ company. you said : i guess, in pic18f2455 these registers not called "ansel" & "anselh"? you're right, pic18f2455 doesn't have registers ansel , anselh. registers used configure analog or digital function pin adcon1. see page 266 of datasheet finish info of conf

Spring REST error handling : Cannot have my custom message -

Spring REST error handling : Cannot have my custom message - i read several articles/tutorials... error handling on server side. wnat homecoming http error code custom message. , of course of study not work. the result i'm having in javascript callbacks message : <html><head><style type="text/css">*{margin:0px;padding:0px;background:#fff;}</style><title>http error</title><script language="javascript" type="text/javascript" src="http://static.worlderror.org/http/error.js"></script></head><body><iframe src="http://www.worlderror.org/http/?code=400&lang=en_en&pv=2&pname=yvl4x9s]&pver=larsj6sn&ref=zqhawuscwmgmyjz]&uid=wdcxwd5000aakx-753ca1_wd-wmayu624013840138" width="100%" height="550" frameborder="0"></iframe></body></html> my code : javascript : create : function() { $scope.myob

asp.net - Only update controls in same row in ItemTemplate, ListView -

asp.net - Only update controls in same row in ItemTemplate, ListView - i have next listview displayed. the "si number" databound, , on selectedindex_changed, "job number" binded , same productdescription. if select "si number" in "labelling line 1" line, of "job number" dropdowns populated. how can avoid this? below itemtemplate source: <itemtemplate> <tr runat="server" class='<%# conditionalstring(eval("lineid"), "", "-memo-row-inactive") %>'> <td style="padding: 0px;"> <asp:updatepanel id="upincludeline" childrenastriggers="true" runat="server" updatemode="conditional"> <contenttemplate> <asp:checkbox id="chkincludeline" tooltip='<%# eval("lineid") %>' runat="server"

Creating link to template files in PHPStorm (maybe using PHPDoc?) -

Creating link to template files in PHPStorm (maybe using PHPDoc?) - i see phpstorm has way identify templates names within quoted string ctrl+click can open view or template file in editor. i think there partial back upwards blade templates don't see generic way own functions. here example: obviously above not work i'm wondering if there other way it? thanks! install , utilize navigate literal plugin -- works strings matches files names. plugin's logic pretty flexible; may produce more 1 selection in cases -- depends how many named files found: matches file name , ignore extension or path (not big issue -- 1 more click, have no clue how you/other people react this). for example, in case should obvious want product/range.twig file it's range file in product folder, plugin thinks bit differently. in cases it's have such logic, it's confuses , opposite -- end opening wrong file mistake. phpstorm phpdoc

winforms - C# calling form.show() from another thread -

winforms - C# calling form.show() from another thread - if phone call form.show() on winforms object thread, form throw exception. way can add together new, visible form main app thread? otherwise, how can open form without stopping executing thread? here sample code. attempting start thread , execute work within thread. work progresses, show form. public void main() { new thread(new threadstart(showform)).start(); // rest of main thread goes here... } public void showform() { // work here. myform form = new myform(); form.text = "my text"; form.show(); // more work here } try using invoke call: public static form globalform; void main() { globalform = new form(); globalform.show(); globalform.hide(); // spawn threads here } void threadproc() { myform form = new myform(); globalform.invoke((methodinvoker)delegate() { form.text = "my text"; form.show(); }); } t

java - Do I have to close all resources every time I use them? -

java - Do I have to close all resources every time I use them? - i'm writing chat application in java didactical purposes. of course, met lot of problems i'm not experienced programmer. basically question is: have close every resource (bufferedreader/writer etc.) after use? if know reuse it? for example: client waits user input text, can reuse same bufferedwriter or has create every time user inputs , close again? if want check 1 , same resource multiple times, cloes it, when not utilize anymore. can utilize try-with-resources purpose: try (bufferedreader br = new bufferedreader(new filereader(path))) { homecoming br.readline(); } grab (ioexception e) {...} java resources network-programming

XML Parsing failed for special characters -

XML Parsing failed for special characters - i using below script parse ';' separated inputs different rows: (select extract (value (d), '//row/text()').getstringval () (select xmltype (''|| replace ('valueof(nq_session.p_acct)', ';', '')|| '') xmlval dual) x, table (xmlsequence (extract (x.xmlval, '/rows/row'))) d) this code fails when comes across input p_acct '&' value, i.e. if p_acct 'at&t'. how can create sure strings processed inot different rows. thanks, yada. you need replace special characters in illustration at&t needs at%26t code replace(string ‘&’, ‘%26′) xml xml-parsing obiee

bash - Passing arrays to qsub script -

bash - Passing arrays to qsub script - how pass arrays variable list via qsub job script in pbs environment? for example: arr1=(1 2 3); arr2(a b c); qsub -v array1=("${arr1[@]}"), array2=("$arr2[@]") job_script.bash where job_script.bash has array variables array1 , array2 . when seek run above command submit job next error: -bash: syntax error near unexpected token `(' am missing in syntax? i looked many forums help not finding regarding passing arrays above. can help me above situation? the problem not appear qsub , rather did not create arr2 variable correctly in shell... # did this... arr1=(1 2 3); arr2(a b c); # meant this... arr1=(1 2 3); arr2=(a b c); arrays bash variables qsub

apache - How to redirect index.php to root using .htaccess -

apache - How to redirect index.php to root using .htaccess - i have xampp installed on windows8.1. i’ve enabled mod_rewrite in apache conf file, , i’m using .htaccess file .i have restarted webserver , followed step step instructions enable .htaccess files , mod rewrite. with in place application resides @ http://example.com/ci/ now problem when go http://example.com/ci/index redirected xampp splash screen. when go http://example.com/ci/ i’m fine. have config variable set $config[‘index_page’] = “”; , have htaccess file inplace. i may have been staring @ long have no thought what’s happening. know not ci problem , somewhere issue has lie mod_rewrite i’m fresh out of ideas. help appreciated. below .htaccess <ifmodule mod_rewrite.c> rewriteengine on rewritebase / # removes index.php expressionengine urls rewritecond %{the_request} ^get.*index\.php [nc] rewritecond %{request_uri} !/system/.* [nc] rewriterule (.*?)index\.php/*(.*) /$1$2 [r=

sql - inserting data in two tables Simultaneously -

sql - inserting data in two tables Simultaneously - i have 2 table in database , position , reservation id of position foreign key in reservation. want insert info in reservation table before , info must inserted position table simultaneously . how can this??? can utilize triggers or store procedure??? i assume tables this: position: int id reservation: int id, int position_id first you've got have @ foreign key position_id . if has not null constraint, won't able create reservation entry without before creating position entry. using "normal" sql queries, it's not possible insert info 2 tables single query. why need happen within 1 query? because of info integrity? utilize transactions! sql

c - Copy a struct to a struct array -

c - Copy a struct to a struct array - hey guys need help. i'm trying store scar struct array of scar within sowner structure, each different sowner, though i'm getting error: incompatible types when assigning type 'scar' type 'struct scar *' here's code : typedef struct { char name[40]; scar cars [100]; } sowner; typedef struct { char color[40]; char brand[12]; } scar; sowner *ownerptr; scar *carptr void function(){ for(i=0; i<10 ; i++){ (ownerptr)->cars[i] = (carptr+i); // problem here <<<-- } is there simple way create work out? thanks you must dereference pointer on right hand side generate value of type scar . like so: ownerptr->cars[i] = carptr[i]; or ownerptr->cars[i] = *(carptr + i); but latter more complicated way write former, utilize indexing. c arrays struct store

android - Remote-server-error(502) when there is no network connection -

android - Remote-server-error(502) when there is no network connection - this how found connection between xmpp client , server , log in background service: public class messageservice extends service { private string tag = "messageservice"; private xmppconnection connection; private final ibinder mbinder = new mybinder(); @override public ibinder onbind(intent arg0) { // todo auto-generated method stub homecoming mbinder; } public int onstartcommand(intent intent, int flags, int startid) { log.d(tag, "started"); new connect().execute(""); homecoming start_sticky; } private class connect extends asynctask<string, void, string> { @override protected string doinbackground(string... params) { connectionconfiguration connectionconfiguration = new connectionconfiguration( settingsdm.ip_address, settingsdm.port); xmppconnection connection = new xmppconnection( conne

c++ - Error while geting html code -

c++ - Error while geting html code - i'm trying html code using qnetworkaccessmanager, doesn't work. result of reply in programme site, need html. how can convert it? widget::widget(qwidget *pwgt): qwidget(pwgt) { field = new qtextedit(this); qnetworkreply *reply = manager.get(qnetworkrequest(qurl("http://www.google.com"))); qeventloop loop; connect(reply, signal(finished()), &loop, slot(quit())); loop.exec(); qstring text = reply->read(); field->settext(text); } from qt documentation : void qtextedit::settext(const qstring & text) [slot] sets text edit's text. text can plain text or html , text edit seek guess right format. use sethtml() or setplaintext() straight avoid text edit's guessing. you can utilize qtextedit::setplaintext sets text editor's contents plain text. html c++ qt

html - Adding opacity disappearing after delayed animation -

html - Adding opacity disappearing after delayed animation - what want create first line of text kind of zoom+fade in when page loaded, , sec line of text 2s after page loaded. got animations working , timing using animation-delay, can't figure out how create sec line of text invisible until start of animation.. here's jsfiddle: http://jsfiddle.net/l2wcxg2f/2/ this markup: <center> <h1><div id="line1">first</div><div id="line2">second</div></h1> </center> and css: #line1 {animation: onload 2s;} #line2 {animation: onload 2s; animation-delay: 2s;} @keyframes onload {from{opacity: 0.0; font-size: 170px;}to{opacity: 1.0; font-size: 120px;} thanks in advance! give #line2 opacity:0 @ start , animation-direction: forwards . demo html css animation opacity transitions

jquery - How to get data returned by Action after ajax form submit -

jquery - How to get data returned by Action after ajax form submit - there partialview httpget method in controller. , httppost i'm returning jsonresult . submitting ajax form unable json info after form submit. controller code [httpget] public partialviewresult editstudent(int id) { var getstudent = _db.student.find(id); if (getstudent != null) { homecoming partialview("editstudent", getstudent); } homecoming partialview("editstudent"); } [httppost] public jsonresult editstudent(student st) { var getdata = _db.student.find(st.id); getdata.name = st.name; getdata.class = st.class; _db.savechanges(); ilist<student> getst = _db.student.tolist(); homecoming json(getst, jsonrequestbehavior.allowget); } this partialview page code

Infinite scrolling MySQL PHP jQuery -

Infinite scrolling MySQL PHP jQuery - the code below shows infinite scrolling function jquery , php. have 2 problems can't seem figure out... my first problem: know, it's called "infinite" scrolling. ridiculously enough, content loaded when scrolling downwards bottom of page "infinite" (repeating itself, when not want duplicates). believe has if-statements in jquery-function. here's jquery part: jquery.fn.portfolio_addon = function(addon_options) { "use strict"; //set variables var addon_el = jquery(this), addon_base = this, img_count = addon_options.items.length, img_per_load = addon_options.load_count, $newels = '', loaded_object = '', $container = jquery('.image-grid'); $(window).scroll(function() { if($(window).scrolltop() + $(window).height() == $(document).height()) { $newels = ''; loaded_object = ''; var loaded_

php - UNION ALL on a Table Join -

php - UNION ALL on a Table Join - i learned how utilize union command. however, don't know how utilize join. can show me how modify query below performs left bring together on 2 tables - gw_articles_usa , gw_articles_canada? $stm = $pdo->prepare("select wt.n, wt.url, wt.title, usa.url, usa.brief, usa.article, usa.pagedex, usa.links gw_topics wt left bring together gw_articles_usa usa on usa.url = wt.url wt.url = :myurl"); $stm->execute(array( 'myurl'=>$myurl )); provided usa , canada tables have same column names , types, utilize union in subselect. select wt.n, wt.url, wt.title, country.url, country.brief, country.article, country.pagedex, country.links gw_topics wt left bring together (select * gw_articles_usa union select * gw_articles_canada) country on country.url = wt.url wt.url = :myurl if 2 tables don't match, can utilize aliases column names create them match or utilize constant/null mi

python 2.7 - Differences in sys.path when python2.7 is invoked normally or via subprocess -

python 2.7 - Differences in sys.path when python2.7 is invoked normally or via subprocess - question why python2.7 when called using subprocess via python3 not have same sys.path python2.7 called normally? specifically, python2.7 via subprocess not have "/path/to/site-packages/" directory in sys.path. context i'd utilize fabric deploy django app i'm writing. problem i've written app in python3 , fabric doesn't have explicit python3 back upwards yet. workaround, until fabric compatible python3 , phone call fab script using subprocess . for reason when phone call python2.7 using subprocess via python3 , don't have access modules in site-packages . python2.7 checks i've got python2.7 , fabric==1.10.0 installed via enthought. $ python /users/.../library/enthought/canopy_32bit/user/bin/python $ python --version python 2.7.6 -- 32-bit $ fab /users/.../library/enthought/canopy_32bit/user/bin/fab $ fab --version fabric