Posts

Showing posts from August, 2013

javascript - Add class when Load content from external source -

given script load data specific div of external source on click. trying add div class when loading content image , text. mean when contents loads new classes auto added <div class="images"> img</div> , <div class="summery"> text text text</div> html: <button class='btn'/> <div id="load-here"></div> <!-- load here --> </body> script: $(function() { var page = null; var counter = 0; function getnext() { // grab next element array of date-outer divs , copy .content div if (counter >= page.length) return; var elm = $(page[counter]).clone(); elm.find('script').remove(); // remove script tags in div elm.appendto('#load-here'); counter++; } $('button.btn').click(function(e) { if (page === null) { page = false; // prevents request being made twice $.get(...

ide - Tips to use Android Studio -

i found easier understand code when know hierarchy relationship between classes, helpful points path how open window shows hierarchy tree of class showed below: sorry don't have enough reputation post images, please click here view image.... thanks concern! navigate menu > type hierarchy. or press ctrl+h

php - file_exists(...) not working in wordpress -

trying use file_exists() function in wordpress unable expected result. if(file_exists(wp_plugin_url.'/sinetiks-schools/images/t_1.jpg')){ echo "ok"; } else { echo "not"; } you should try: if(file_exists(plugin_dir_path( __file__ ).'/sinetiks-schools/images/t_1.jpg')){ } make sure getting correct path plugin_dir_path( __file__ ) you can find more information on plugin_dir_path function here

Filter using project activity codes dissapper during copy in Primavera P6 -

i'm working on primare p6 r8.4. need copy project work on new scenario. when activity filters using project activity codes dissapper in new copy. need walkaround overcome stiuation. i know can use eps activity codes have problem in xer exports. you right, when copy project, filters become empty. keep filters clearing out when copy project, it's best use global activity codes. eps activity codes may give issues. the problem import / export - activity codes exported , imported else's database - if didn't want them. an 2nd alternative avoid activity codes, , use user defined fields (udf) instead. filters endure if build them around udfs.

How do I get a list of installed apps along with the icons (android) in Phonegap/Cordova? -

how list of installed apps along icons (android) in phonegap/cordova? there plugin available? want avoid trouble of creating own plugin. there's plugin, pretty basic should starting point: https://github.com/weelion/phonegap-plugin-installed-apps

java - Gradle fails to download external dependency from local artifactory which should be downloaded form mavenCentral -

my gradle build fails due error artifactory: failure: build failed exception. * went wrong: not resolve dependencies configuration ':publishservice:compile'. > not resolve org.geotools:gt-wfs:9.0. required by: infraview_gradle:publishservice:0-snapshot > net.infraview:infraview_context:0-snapshot infraview_gradle:publishservice:0-snapshot > net.infraview:infraview_srv_masterdata:0-snapshot > not head 'http://beast:8082/artifactory/libs-snapshot-local/org/geotools/gt-wfs/9.0/gt-wfs-9.0.pom'. received status code 409 server: conflict the geotools artifact not in "libs-snapshot-local" - artifactory. why gradle try download there? when paste request http://beast:8082/artifactory/libs-snapshot-local/org/geotools/gt-wfs/9.0/gt-wfs-9.0.pom into browser get: "message" : "the repository 'libs-snapshot-local' rejected artifact 'libs-snapshot-local:org/geotools/gt-wfs/9.0/gt-wfs-9.0.pom' due sn...

uid - Questions regarding the DICOM file -

i have 2 questions when reading dicom standard: in dicom file, (0002 0003)"media storage sop instance uid" , (0008 0018) "sop instance uid", same? (0002 0002) , (0008 0016)? , why ?? yes same. tags group 0002 part of dicom p10 header, assume duplicated can read without having parse entire file.

objective c - Get CGRect from NSStringFromCGRect -

i stored frame ( cgrect ) in nsstringfromcgrect , how later retrieve rect? [mdict setobject:nsstringfromcgrect(frame) forkey:@"frame"]; i need data how? cgrect frame = [[mdict objectforkey:@"frame"] ..?] does method exist or have parse string manually? i think looking for, cgrect frame = cgrectfromstring([mdict objectforkey:@"frame"]);

hadoop - Hive UDF String to Date Convertion -

the hive contains table "sample" following data: 15-06-2015 15-06-2015 15-06-2015 15-06-2015 15-06-2015 15-06-2015 16-06-2015 using following query converting string type of data hive date format: select to_date(from_unixtime(unix_timestamp(date,'dd-mm-yyyy'))) sample; the output follows: 0 2014-12-28 1 2014-12-28 2 2014-12-28 3 2014-12-28 4 2014-12-28 5 2014-12-28 6 2014-12-28 the output differ expected output. please suggest how expected output like: 2015-06-15 2015-06-15 2015-06-15 2015-06-15 2015-06-15 2015-06-15 2015-06-16 your problem hiveql case insensitive, second argument of unix_timestamp function, instead, case sensitive . right syntax query is: select to_date(from_unixtime(unix_timestamp(date,'dd-mm-yyyy'))) sample; in way, you'll expected result.

git - Alcatraz - Xcode Command Line Tools are not currently installed -

Image
i'm managing xcode plug-ins via alcatraz. everything alright until installed , uninstalled git following instruction in uninstalled.sh file in official git.zip file: sudo rm -rf /usr/local/git/ (in case it's /usr/local/git/bin/git) sudo rm /etc/paths.d/git sudo rm /etc/manpaths.d/git i have no idea i've done git affect alcatraz. once click package manager in xcode error: i found nothing download in preference download section, , did try install command line tool following xcode command line tool tutorial here's how verified it: mymacbook-air:~ me$ xcode-select -p /applications/xcode.app/contents/developer and even: mymacbook-air:~ me$ gcc --version configured with:--prefix=/applications/xcode.app/contents/developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 apple llvm version 7.0.0 (clang-700.0.72) target: x86_64-apple-darwin14.5.0 thread model: posix the warning still pops up. did fail install command line tool? (...

What address should i use for listen_address in cassandra.yaml ? -

i trying set multinode cassandra database on 2 different machines. how supposed configure cassandra.yaml file? datastax documentation says listen_address¶ (default: localhost ) ip address or hostname other cassandra nodes use connect node. if left unset, hostname must resolve ip address of node using /etc/hostname, /etc/hosts , or dns. not specify 0.0.0.0. when use 'localhost' value of listen_address, runs fine on local machine , , when use ip address, fails connect. why so? configuring nodes , seed nodes simple in cassandra steps must followed. procedure setting multi node cluster documented , quote linked document. i think easier illustrate set of nodes 4 instead of 2 since 2 nodes make little sense running cassandra instance. if had 4 nodes split between 2 machines , 1 seed node on each machine conceptual configuration appear follows: node1 86.82.155.1 (seed 1) node2 86.82.155.2 node3 192.82.156.1 (seed 2) node4 192.82.156.2 if each of these ...

r - Increase value of an object inside a function everytime it gets called -

i have function say, inc <- function(t) { f <- 1 t + f } so, first time function inc gets called, f 1 , next time gets called f value should 2 , when function inc gets called 3rd time f value should 3 , on... how do in r? i use this. don't know if trick or hack: getf <- function(){ x <- 1 function(t){ x <<- t + x } } f <- getf() f function (the return value of getf ) , it's enclosing environment not global environment, environment wherein f defined. @ environment(f) . <<- assigns x environment: see ls(environment(f)) , get("x", environment(f)) . print(f(3))#4 print(f(4))#8

three layer neural network for MNIST with Python -

i'm writing own code implement single-hidden-layer neural network , test model on mnist dataset. got wired result(nll unacceptably high) though checked code on 2 days without finding what's went wrong. here're global parameters: layers = np.array([784, 300, 10]) learningrate = 0.01 momentum = 0.01 batch_size = 10000 num_of_batch = len(train_label)/batch_size nepoch = 30 softmax function definition: def softmax(x): x = np.exp(x) x_sum = np.sum(x,axis=1) #shape = (nsamples,) row_idx in range(len(x)): x[row_idx,:] /= x_sum[row_idx] return x sigmoid function definition: def f(x): return 1.0/(1+np.exp(-x)) initialize w , b k = np.vectorize(math.sqrt)(layers[0:-2]*layers[1:]) w1 = np.random.uniform(-0.5, 0.5, layers[0:2][::-1]) b1 = np.random.uniform(-0.5, 0.5, (1,layers[1])) w2 = np.random.uniform(-0.5, 0.5, layers[1:3][::-1]) b2 = np.random.uniform(-0.5, 0.5, (1,layers[2])) and following core part each mini-batch: for idx in r...

Downloading large files in the background (Android ) -

what recommended solution downloading large files in background (larger 100mb) on android? downloadmanager google volley asynctask , httpclient largefiledownloader you can use intent service / service long background operations per need , google volley sufficient enough work handles network related tasks itself

Is there any way to pass PHP object as JavaScript parameter in HTML? -

i project using laravel 5. show table view , want when click link pass data value data javascript function. try several way cannot it. @foreach ($basl_officers $basl_officer) <tr> <td><a href="#" onclick="functionone($basl_officer)" >{{ $basl_officer->officername }} </a></td> <td align='center'> {!! form::open(['method' => 'delete', 'route'=>['basl_officers_page.destroy',$basl_officer->id]]) !!} <a href="{{route('basl_officers_page.edit',$basl_officer->id)}}" class="btn btn-default btn-sm"> <span class="glyphicon glyphicon-pencil"></span> </a> &nbsp &nbsp <button type="submit" class="btn btn-default...

javascript - Accessing SVG element attribute from <use> element through external file -

i have svg line defined in line.svg file so: <line id="vertical_line" x1="357.5" y1="153" x2="357.5" y2="80"/> i referencing "vertical_line" in javascript , adding svg line dom. var verticalline = document.createelementns('http://www.w3.org/2000/svg', 'use'); verticalline.setattributens('http://www.w3.org/1999/xlink', 'xlink:href','./images/line.svg#vertical_line'); i want able manipulate verticalline's "y1" attribute value. cannot access attribute via verticalline object. what method can use access svg attribute of original svg element when creating element through javascript external file?

javascript - Bluebird Promise: error is not a function -

for reason can't find out, simple piece of code doesn't work. new promise(function (resolve, reject) { resolve(); }).then(function() { console.log("then: ") }).error(function(err) { console.log("err: ", err) }) it gives me uncaught typeerror: (intermediate value).then(...).error not function if replace error catch , runs fine. prefer not catch though. what missing here? making comment answer since turned out solution... if .error() not exist, aren't using bluebird promise since .error() not part of promise standard may have built-in promise instead of bluebird promise. check make sure bluebird included in project.

javascript - How to use jsf.ajax.request to manually send ajax request in JSF -

i have table , each row has 'onclick' configured call js function - part works. function issue ajax request method can somehow define. upon return, div below table should rendered. possible? tried js function code: <h:outputscript library="javax.faces" name="jsf.js" /> ... function clickandrender() { jsf.ajax.request(this, event, {render: 'div-to-render'}) } but doesn't work of course. have no idea values of 'source' parameter (the code above uses 'this') should be, neither know execute in last parameter should set to. don't know how define url called , 'action' method. the solution using invisible form somewhere else in page get's submitted click. can help? as per jsf 2.3, can use <h:commandscript> this. see spec issue 613 . <h:form> <h:commandscript name="foo" action="#{bean.action}" render="div-to-render" /> </h:form> fun...

php - Is it possible to use PDO lastInsertId() when the table was previously locked? -

Image
this question again important me. have solution? $conn = new pdo('mysql:dbname=test;host=127.0.0.1', 'root', '********'); $conn->exec('create table testincrement ' . '(id int not null auto_increment primary key, name varchar(50))'); $sth = $conn->prepare('insert testincrement (name) values (:name);'); $sth->execute([':name' => 'foo']); var_dump($conn->lastinsertid()); output is: string(1) " lastinsertid ". when lock table lastinsertid 0. code returns 0: $conn = new pdo('mysql:dbname=test;host=127.0.0.1', 'root', 'paragraf'); $conn->exec('create table testincrement ' . '(id int not null auto_increment primary key, name varchar(50))'); $sth = $conn->prepare('lock table testincrement write; insert testincrement (name) values (:name); unlock tables;'); $sth->execute([':name' => 'foo']); var_...

.net - Getting absolute URLs using ASP.NET Core MVC 6 -

in mvc 5, had following extension methods generate absolute urls, instead of relative ones: public static class urlhelperextensions { public static string absoluteaction( urlhelper url, string actionname, string controllername, object routevalues = null) { string scheme = url.requestcontext.httpcontext.request.url.scheme; return url.action(actionname, controllername, routevalues, scheme); } public static string absolutecontent( urlhelper url, string contentpath) { return new uri(url.requestcontext.httpcontext.request.url, url.content(contentpath)).tostring(); } public static string absoluterouteurl( urlhelper url, string routename, object routevalues = null) { string scheme = url.requestcontext.httpcontext.request.url.scheme; return url.routeurl(routename, routevalues, scheme); } } what equivalent in asp.net core mvc 6? urlhe...

jsf - Identifying and solving javax.el.PropertyNotFoundException: Target Unreachable -

when trying reference managed bean in el #{bean.entity.property} , javax.el.propertynotfoundexception: target unreachable exception being thrown, when bean property set, or when bean action invoked. there seem 5 different kinds of messages: target unreachable, identifier 'bean' resolved null target unreachable, 'entity' returned null target unreachable, 'null' returned null target unreachable, ''0'' returned null target unreachable, 'bracketsuffix' returned null what mean? how caused , how should solved? 1. target unreachable, identifier 'bean' resolved null this boils down managed bean instance not found identifier (managed bean name) in el #{bean} . identifying cause can breakdown in 3 steps: a. who's managing bean? b. what's (default) managed bean name? c. where's backing bean class? 1a. who's managing bean? first step checking bean management framework responsible managing...

xcode - Can't release to AppStore with Delphi 10 Seattle and iOS 9 -

Image
i using xcode 7 , delphi 10 seattle . if try deploy appstore got these messages. error itms-90507 : "missing info.plist valua. value kay dtplatformname in bundle .. required." error itms-90094 : "invalid launch image - app contains launch image size modifier supported apps built ios 6.0 sdk or later." error itms-90534 : "invalid toochain. news , app updates must built public (gm) version of xcode 6 or later, , ios 8 sdk or ... error itms-90507: to resolve issue dtplatformname key must added project's plist file correct value. easiest way add under "project->options->version info" "ios 64 bits - release" configuration set. on "key/value list box" right-click anywhere in list of fields , select "add key". put "dtplatformname" key , "iphoneos" value. error itms-90094 try setting ios device 64 bit->configuration 'application store' in p...

scala - Searching for whole URL using elastic4s -

i'm using elastic4s in order index , search data in es. part of document i'm storing contains url field need search (the entire url). problem occurs when search document containing url field , 0 results. for purpose of search define mapping ahead of inserting data index: client.execute { create index <my_index> mappings { <my_type> { "url" typed stringtype analyzer notanalyzed } } } i'm inserting data: client.execute { index <my_index> -> <my_type> fields ( "url" -> "http://sample.com" ) }.await and search documents: val filter = """ |{ | "filtered" : { | "query" : { | "match_all" : {} | }, | "filter" : { | "bool" : { | "should" : [ | { "bool" : { | "must" : [ | ...

java - Using JSoup to scrape Google Weather Results -

Image
i'm trying weather condition google web page, , there tag on html elements wob_tm , tried value, exception try { document document = jsoup.connect("https://www.google.jo/webhp?hl=en#hl=en-jo&q=amman+weather").get(); element temp = document.getelementbyid("wob_tm"); system.out.println(temp.text()); // exception in thread "main" java.lang.nullpointerexception } catch (ioexception ex) { logger.getlogger(main.class.getname()).log(level.severe, null, ex); } there error in query , should define user agent document doc = jsoup .connect("https://www.google.com/search?q=mario"); .useragent("mozilla/5.0") .timeout(5000).get();

java - How to get JVM? -

i wanted see memory consumption of running java program. if write program runtime.freememory() , program run under new jvm. how running java program's jvm , run runtime.freememory() ? you can use jvisualvm . accesses local or remote (if enabled) jvms , provides various options graphically monitor memory usage , threads. many similar tools (command line or graphical) exist if 1 not suit needs.

Extract PDF labels to a CSV file using JavaScript -

i extract page labels of pdf csv file, @ moment have loop shows labels in adobe acrobat javascript console. the code is: var labels = this.getpagelabel(0); (var i=1; i<this.numpages; i++) labels += ", " + this.getpagelabel(i); console.println(labels); is there way export results console csv file or method create csv file expected results? thanks! sure, possible. you create data object, , export it. contents of data object labels string. syntax , additional information, see acrobat javascript documentation.

jquery - X-editable official example (jsFiddle) doesn't work -

i learning x-editable library , wonder why 1 of examples official website not working. javascript $('#username').editable({ type: 'text', url: '/post', pk: 1, title: 'enter username', ajaxoptions: { datatype: 'json' }, success: function(response, newvalue) { if(!response) { return "unknown error!"; } if(response.success === false) { return response.msg; } } }); //ajax emulation $.mockjax({ url: '/post', responsetime: 200, response: function(settings) { if(settings.data.value) { this.responsetext = '{"success": true}'; } else { this.responsetext = '{"success": false, "msg": "required"}'; } } }); see full code here: http://jsfiddle.net/xbb5x/62/ when click on editable text, cha...

excel - Cycle through employee numbers and save multiple PDF files -

the spreadsheet have has 2 tabs, 1 of tabs list of employees each of has unique employee number , various other pieces of information employee. the second tab have page put employee number in , bring through of employee's information using vlookups, there save button can save employee's information pdf file. on save button, there macro can press button , save employees information multiple different pdf files, not saving them 1 @ time? i'm talking cycling through employee numbers , saving each one? the code have attached button follows: option explicit sub savepdf() dim wsheet worksheet dim vfile variant dim sfile string set wsheet = activesheet sfile = replace(replace(range("i11"), " ", ""), ".", "_") _ & "_" _ & range("i10") _ & ".pdf" sfile = thisworkbook.path & "\" & sfile excel.application.filedialog(msofiledialogsaveas)...

ios - How to listen to lock / unlock phone event while application is running in the background? -

i have app monitor when phone becomes locked , unlocked, when turns blank (after longer inactivity), while app not focused, running in background. i can receive lock/unlock/blank events ease while app focused: -(void) startlisteningforphonelockevent { nslog(@"start listening lock/unlock , screen-goes-black events."); cfnotificationcenteraddobserver(cfnotificationcentergetdarwinnotifycenter(), (void*)self, lockstatechanged, cfstr("com.apple.springboard.lockstate"), null, cfnotificationsuspensionbehaviordeliverimmediately); cfnotificationcenteraddobserver(cfnotificationcentergetdarwinnotifycenter(), (void*)self, hasblankedscreen, cfstr("com.apple.springboard.hasblankedscreen"), ...

c - Traversing a tree using linked list structure -

Image
i have struct node contains next , child. struct node{ node *parent; node *next; node *child; } the following picture shows structure of tree. how write function traverse tree? without recursion ? i have pseudo code in mind not sure if correct or no, because each node can have child , need search using child too while ( root !=null) { root = root->next; } i visit nodes. i guess tree this: -> grandma -> dad -> me -> sister -> niece -> brother -> uncle -> cousin where indentation means level of ancestry. recursive function simple: void traverse_rec(const node *node) { if (node) { process(node); traverse_rec(node->child); traverse_rec(node->next); } } this can rewritten loop. if current node has child, that's next node visit. otherwise, want visit sibling. node may not have sibling. because have link parent node (and root node's par...

how to get value of number into alphabet in sql server? -

how value of number 1,2,3,4............ in alphabet? is there function convert directly? i have blanck table column emp_id,empfname,emplname,doj now want create 50000 employe cursor..how can do? you can try this: declare @num int = 1; select letters = char(64 + @num)

Django migrations: how to generate database from current state of the models (good old syncdb --all) -

usually when started working on django+south project had been in development time didn't bother applying hundreds of migrations current state of database. went straight syncdb --all create database current model state run migrate --fake mark migrations passed. in matter of few seconds had database in sync migrations. syncdb loaded initial fixtures. 99% cases needed. happy. how can now? syncdb deprecated , migrate command doesn't have option ignore migrations , create database current state of model classes. migrate command makes me go through tons of migrations many months of project development. these migrations have weird errors don't care about. extremely slow if messed in implementation of migration engine. i want able say: "hey, django, model, create me database model, fake migrations , let's work there". i know can delete migrations locally, create initials apps , apply them seems weird workaround equivalent of syncdb --all. am missing s...

export to csv from neo4j using import-cypher -

i found neo4j data exporting tool ( https://github.com/jexp/neo4j-shell-tools#cypher-import ) , worked on mac os computer. followed same step export data ubuntu server , following error message generated without further explanations. has used tool on ubuntu , idea error message may indicate? also, there way export large (~100m rows) neo4j data csv file? neo4j-sh (?)$ import-cypher -d"," -o test.csv match (p:product)-[s:similar_to]-(q:product) return p.id,q.id limit 10 query: match (p:product)-[s:similar_to]-(q:product) return p.id,q.id limit 10 infile (none) delim ',' quoted false outfile test.csv batch-size 1000 error occurred in server thread; nested exception is: java.lang.nosuchmethoderror: org.neo4j.graphdb.graphdatabaseservice.execute(ljava/lang/string;)lorg/neo4j/graphdb/result; i added new way of exporting data cypher statements. https://github.com/jexp/neo4j-shell-tools#cypher-export (note neo4j 2.2.5) but 100m rows think import-cyph...

Windows Push Notification Services Token request via ColdFusion -

i trying "access token" wns via coldfusion request "bad request" response. believe have set correctly following instructions here . devices registering uri's backend. here simple code snippet; (i've hidden secret key of course) <cfhttp url="https://login.live.com/accesstoken.srf" method="post" result="httpresp"> <cfhttpparam type="header" name="content-type" value="application/x-www-form-urlencoded" /> <cfhttpparam type="url" name="grant_type" value="client_credentials" /> <cfhttpparam type="url" name="client_id" value="ms%2dapp%3a%2f%2fs%2d1%2d15%2d2%2d1197233413%2d3602308102%2d1084427847%2d2188608249%2d1036687727%2d3580410356%2d2392468796" /> <cfhttpparam type="url" name="client_secret" value="************************" /> <cfhttpparam type="url" name="s...

java - Problems with storing data into database using angularjs and spring boot -

this have: user.java @entity public class user { @id @generatedvalue(strategy=generationtype.identity) private integer id; @column private string username; @column private string password; @column private string lastname; public integer getid() { return id; } public string getlastname() { return lastname; } public string getpassword() { return password; } public string getusername() { return username; } } usercontroller.java @restcontroller @requestmapping("/user") public class usercontroller { @autowired private userrepository repo; @requestmapping(method = requestmethod.post) public user adduser(@requestbody user user) { return repo.saveandflush(user); } user.service.js note: here console output 3 values of username,password , lastname. function create(user) { console.log(user.username) console.log(us...

ios - JSON data to UITableView using Objective-C -

-- updated question main json file -- i'm trying add names table view. table empty. (xcode 7.1b1, ios 9.1b2) sample .json file i'm testing code with. main json file has lot more data. i successful in adding data sample json file. after using main json file, table empty again. .json file [ { "150978": { "jobs": { "d0-c14008-cw": { "05-9032": { "g-05": { "hours_rwk": "false", "hours_st": "4l", "hours_ewo_id": "d0-c14008-cwddda", "hours_ewo": "true", "hours_dt": "0l", "hours_ot": "0l", "comments": "" } }, "05-9031": { "b-02": { "hours_rwk": "false"...

hadoop - How to process large file with one record dependent on another in MapReduce -

i have scenario there large file , line 1 record might have dependency on 1000th line data , line 1 , 1000 can part of separate spilts. understanding of framework record reader going return 1 key, value pair mapper , each k,v pair independent of another. since file has been divided splits , want (i.e. splittable false no option), can handle anyhow may writing own record reader, mapper or reducer? dependency - row1: a,b,c,d,e,f row2: x,y,z,p,q,r now x in row2 need used d in row1 desired output. thanks. i think need implement reducer side join . here can see better explanation of it: http://hadooped.blogspot.mx/2013/09/reduce-side-joins-in-java-map-reduce.html . both related values have end in same reducer (defined key , partitioner ) , should grouped ( groupingcomparator ) , may use secondsort order grouped values.

wordpress - Get a ACF field using get_pages() -

Image
i'm displaying list of sibling pages using below code. retrieving page title , link. need grab custom field called excerpt , output each sibling item. how do using get_pages ? var_dump i'm using grabbing current pages excerpt, incorrect. <?php global $post; if ( is_page() && $post->post_parent ) { $children = get_pages('child_of='.$post->id); $parent = $post->post_parent; $our_pages = get_pages('child_of='.$parent.'&exclude='.$post->id); $ex = get_field('excerpt', $our_pages); if (!empty($our_pages)): foreach ($our_pages $key => $page_item): <a href="<?php echo esc_url(get_permalink($page_item->id)); ?>" title="<?php the_title(); ?>"> <?php echo $page_item->post_title ; ?> <?php var_dump($ex) ?> <?php endforeach; end...

arrays - How to declare a variable containing more than one integer values SQL Server -

i want store id's in variable use variable multiple times wherever have use in queries. used format as: declare @aid int select @aid = ap.aid sub_aminer_paper ap group ap.aid having min(p_year) = 1990 , max(ap.p_year) = 2014 , count(ap.pid) between 10 , 40 select * sub_aminer_paper aid = @aid but gives me result single id list of id's used query retrieve multiple id's table sub_aminer_paper . please , thanks! what want table variable : declare @aid table(id int primary key) insert @aid select ap.aid sub_aminer_paper ap group ap.aid having min(p_year) = 1990 , max(ap.p_year) = 2014 , count(ap.pid) between 10 , 40 select * sub_aminer_paper aid = (select id @aid)

kernel - Why is the setup syscall not callable by any user? -

http://linux.die.net/man/2/setup i didn't find reason on man page. first off, syscall no longer exists: since linux 2.1.121 , no such function exists anymore. from can see in 2.1.120 , used in init of kernel (and in fact has syscall number 0 ). called twice: first call freed initial memory (from initram) , second call sets devices, filesystems , mounted root. bad if program run syscall (it cause segmentation violations or other bad things). why it's syscall in first place question. downloaded 1.0.0 , , even then syscall not used init (which first guess why syscall). in 0.01 used inside kernel. since there's no usage int 0x80 , i'm perplexed why linus did this. i've sent email linus & lkml , asked on irc (although it's unlikely other linus know, , he's busy answering emails mitochondrial dna of linux). edit: okay, looking further, turns out kernel calling process context (the setup call acts syscall, int 0x80 , all). initi...