Posts

Showing posts from July, 2013

jquery - Bootstrap collapse not opening/closing -

jquery - Bootstrap collapse not opening/closing - i working on new webpage working collapse's not open or close included jquery en bs3 modals, smooth scrolling working. the page http://codenamelungo.net/wiki.php it's safe assume because bootstrap js coming in text/rocketscript instead of text/javascript, browser doesn't know how handle it. i see if can disable script since it's coming through cdn , minimized. reference stack: http://webmasters.stackexchange.com/questions/60276/how-does-cloudflares-rocket-loader-actually-work-and-how-can-a-developer-ensur add data-cfasync="false" script tag in manual mode. jquery twitter-bootstrap collapse

c# - How to get the index of a listview item by it's text -

c# - How to get the index of a listview item by it's text - i'm trying index of item it's text in listview. example, have list view contains items: "item1", "item2"..etc i've tried index of "item2" this: messagebox.show(listview1.items.indexof("item2"); but it's not working... help please? listview.finditemwithtext method want. check out: msdn var item = listview1.finditemwithtext("item2"); if (item != null) { messagebox.show(listview1.items.indexof(item).tostring()); } c# forms listview

MYSQL LEFT JOIN BRINGS WRONG RESULTS -

MYSQL LEFT JOIN BRINGS WRONG RESULTS - i trying figure out why bring together brings results does. here simple test im working on. i have 2 tables : table1 , table2. table1 ------------------- id name amount --------------------- 1 | fred | 2 3 | fred | 3 5 | fred | 4 2 | hellen | 3 4 | hellen | 3 6 | hellen | 3 table2 ------------------- id name amount --------------------- 1 | fred |4 2 | hellen |3 3 | paul |3 4 | fridah |5 when utilize next statement select p.name,sum(p.amount) amount `table1` p left bring together table2 c on p.name = c.name grouping c.name , p.name i result --------------- name amount --------------- fridah | 5 paul | 3 fred | 12 hellen | 9 but wierd. want sum of amount table1, b ut bring together gives me sum of both tables. why this? this query: select p.name, sum(p.amount) amount `table1` p left bring together t

php - Assigning a menu to a view page in drupal 7 -

php - Assigning a menu to a view page in drupal 7 - i have 3 menus named main menu, microsite menu, supernav menu. creating view page , wanted include microsite menu. view page taking default main menu, how can remove main menu , embed microsite menu. cant see alternative selecting available menus in view page settings. how can accomplish this? is there alternative embed microsite menu using php? a menu creation, , build block .. thats true? if yes .. go block --> find microsite menu block --> configuration ---> show block on specific pages ---> select alternative tow (only listed pages) --> set in text area page view name .. and go main menu block --> same lastly steps exeption select selection 1 ( pages except listed ) , set page view name also can utilize context module very nice action go here can set condition, place, rule, pages, block ... by php code can utilize code in block configare if(arg(0) == 'page1') { homecom

How to get folders from physical path from server in asp.net c#? -

How to get folders from physical path from server in asp.net c#? - i have deployed web applciation in sever, when click button folders "d:\test\" has added in foldername list string path = @"d:\test\"; list<string> foldername = new list<string>(); foreach (string s in server.mappath(path)) { foldername.add(s.remove(0, path.length)); } but above code doesn't work. in way can add together folder name in list c# asp.net

php - Reducing MSQL Query to a specific session -

php - Reducing MSQL Query to a specific session - using code below, able display each username , trial 1/0 flag in table. want display info existing user can "hello username, have trial access..." etc... we're using standard htacess un/pass come in info area. what needs alter here show existing user's session? <?php $user_name = "blahblahblah"; $password = "blahblahblah"; $database = "blahblahblah"; $server = "127.0.0.1"; $db_handle = mysql_connect($server, $user_name, $password); $db_found = mysql_select_db($database, $db_handle); if ($db_found) { $sql = "select * member_auth"; $result = mysql_query($sql); while ( $db_field = mysql_fetch_array($result) ) { print $db_field['username'] . " : "; print $db_field['trial'] . " <br> "; } mysql_close($db_handle); } else { print "database not found "; mysql_close($db_handle); } ?> pl

c++ - Build SDL mixer for Android -

c++ - Build SDL mixer for Android - i have build sdl android. but, unfortunately, sdl_mixer missing there. want build sdl mixer. problem is: sdl_mixer wants sdl, how can include libsdl.so , sdl includes eclipse sdl_mixer project? in android.mk sdl_mixer, there reference sdl library: local_shared_libraries = sdl2 so, if build 2 libraries together, reference fulfilled automatically. alternatively, can define sdl2 prebuilt_shared_library. android c++ android-ndk sdl

linux - Bash script, output folder content and bytesize without using ls -

linux - Bash script, output folder content and bytesize without using ls - i working on bash script. script should display content of folder , byte size. normaly utilize ls command in excercise can't utilize it. output on display must in format "file_name:bite_size" trying hours this: #!/bin/bash ifs=" "; string="$(du -bc /var/*)"; textarray=($string); ((i=0; i<${#textarray[@]}; ++i)); echo "${textarray[$i]}"; done exit 0; i on right way or totally wrong? maybe like: stat --format="%n:%s" * linux bash variables output

javascript - jquery form required on specific submit button -

javascript - jquery form required on specific submit button - i have 1 <form> 2 submit buttons. want set title required on 1 submit button, not other one. right works on 1 dont need. button @ end of form , required works: <button type="submit" id="submit" class="btn btn-primary">submit</button> button in middle of form , required not work: <button type="submit" id="submitformat" class="btn">add format</button> js: $("#submitformat").click(function( event ) { $("#required").prop('required',true); } required field: <input type="text" id="required" name="title"/> you need remove required property when utilize other button: $("#submit").click(function() { $("#required").removeprop('required'); }); otherwise may still have required property set when clicked #sub

osx - Get data from HTTP Request - Swift -

osx - Get data from HTTP Request - Swift - today i'm trying info webpage. it keeps crashing saying "exc bad access", suggestion ? class codeviewcontroller: nsobject { @iboutlet var output_box : nstextfield @iboutlet var url_textfield : nstextfield var output : nsstring = "unable load data" func downloadhtml (path: string) -> string { var url = nsurl(string: "\(path)") var request = nsurlrequest(url: url) nsurlconnection.sendasynchronousrequest(request, queue: nsoperationqueue.mainqueue()) {(response, data, error) in self.output = nsstring(data: data, encoding: nsutf8stringencoding) //exc_bad_access when trying set self.output new value } homecoming output } @ibaction func retrive(sender: anyobject!) { println(downloadhtml(url_textfield.stringvalue)) } } i suspect "url_textfield.stringvalue" nil @ point pass in. trying fixed string works. note function homecoming before as

ruby on rails - Query with ransack: how to get no results by default -

ruby on rails - Query with ransack: how to get no results by default - i page have no results default. i accomplish same when add together .none result still after parameters set result shown. how can accomplish that? def index @search = someclass.all @items = @search.result.page(params[:page]).per(10) end if understand question, want index page display no records when first load view (and when filters empty). result in returning many records , user experience slow loading page. one way address create sure execute search query only if search parameters passed action. in controller def index # define search don't execute right away search # execute search query if search params exists items(params[:page],10) if search_params end private def items(page,per=10) @items ||= search.result(page).per(per) end def search @search ||= someclass.search(search_param) end def search_param params[:q] end in view now can safely reference @search,

ems - java zip to binary format and then decompress -

ems - java zip to binary format and then decompress - i have task read zip file local binary message transfer binary message through ems string (done java api) receive transferred binary message string (done java api) decompress binary message , print out the problem facing dataformatexception while decompress message. i have no thought part went wrong. i utilize read file binary message: static string readfile_stream(string filename) throws ioexception { file file = new file(filename); byte[] filedata = new byte[(int) file.length()]; fileinputstream in = new fileinputstream(file); in.read(filedata); string content = ""; system.out.print("sent message: "); for(byte b : filedata) { system.out.print(getbits(b)); content += getbits(b); } in.close(); homecoming content; } static string getbits(byte b) { string result = ""; for(int = 0; < 8; i++) result = ((b

JavaFX 'Type mismatch' with root -

JavaFX 'Type mismatch' with root - something wrong, making nice gui in scenebuilder. can add together elements vboxs , hboxs, cannot seem apply fxml javafx project. here code package org.ntokens.congen; import java.io.ioexception; import javafx.application.application; import javafx.fxml.fxmlloader; import javafx.scene.parent; import javafx.scene.scene; import javafx.scene.control.label; import javafx.scene.layout.vbox; import javafx.stage.stage; public class main extends application{ label label; public static void main(string[] args){ launch(args); } public void start(stage primarystage) { parent root; seek { root = fxmlloader.load(getclass().getresource("mainform.fxml")); } grab (ioexception e) { e.printstacktrace(); return; } scene scene = new scene(root); primarystage.setscene(scene); primarystage.sizetoscene(); primarystag

windows - Chef knife winRM interactive mode hangs in Jenkins -

windows - Chef knife winRM interactive mode hangs in Jenkins - i've been stuck on issue past 3 or 4 days. trying run attached command in windows batch file in jenkins. causes hang , doesn't take farther inputs: knife winrm ec2-xx-xx-xx-xx.compute-1.amazonaws.com interactive -m -x administrator -p xxxxxxxx this works fine if run manually on windows machine, think ruby.exe beingness opened starting cause jenkins problems. has ever used knife winrm's interactive mode in such way before? i'm @ wits end here , need work. give thanks help provide. have tried running "call knife" instead of "knife"? if, within batch file, run batch file (knife.bat, example) without "call", initial batch file run terminated. there's explanation here: http://www.robvanderwoude.com/call.php windows jenkins chef winrm

json - jsonarray.length behaving ambiguosly -

json - jsonarray.length behaving ambiguosly - i have function returns jsonarray . 1) perform thatarray.length gives x 2) add together jsonelement array 3)i perform thatarray.length 1 time again gives (sometimes x , x+1). step done in separate function , variable in store result declared separately @ top of each function eliminate global thing my uncertainty jsonarray.length might asynchronous phone call if asynchronous phone call how wait till result achieved i peforming checks through jasmine thanks in advance code: it("getentities", function() { var no_of_entities; var metaservice = new metadataservice(true); fixture = metaservice.getmetadataprovider(); function successcallback(response) { if (response !== null && response !== undefined) { saas.print("getentities:successcallback"); no_of_entities = response.length; if (response.length !== null && response.length >

asp.net mvc - Kendo comboBox editor with nested grid -

asp.net mvc - Kendo comboBox editor with nested grid - i tried add together combobox editor template in kid kendo grid (nested grid), when open page error returns says "invalid template". what right way add together combo box editor template in kid grid here editor template code @( html.kendo().combobox() .datatextfield("origintext") .datavaluefield("originid") .name("originid") .filter("contains") .datasource(source => { source.read(read => { read.action("origin_combo", "itemorigin"); }) .serverfiltering(true); })) and part of grid .name("itemorigin_#=itemsuppliersid#") . . columns.bound(p => p.origin.originnamee") .editortemplatename("origincomboeditor") .includeinmenu(false); the editortemplate combobox: name("originid") should ma

angularjs - What is the difference between these two ways of defining controllers? -

angularjs - What is the difference between these two ways of defining controllers? - regarding controller definitions. difference between this... angular.module('myapp', ['ui.bootstrap']); function carouselctrl($scope) { ... } and this... var myappmodule = angular.module('myapp', ['ui.bootstrap']); myappmodule.controller('carouselctrl', function($scope){ ... } it seems both of them access ui.bootstrap. how first carouselctrl function connected angular.module? the first 1 global function. should not using it. "connected" module because connected everything. the sec 1 controller declared in module. fine , it's usual approach. can have module directives, module services, etc. more organizing application the safest alternative using annotations: var myappmodule = angular.module('myapp', ['ui.bootstrap']); myappmodule.controller('carouselctrl', [ '$scope', '$h

html - Javascript form is not able to submit as expected on Internet explorer -

html - Javascript form is not able to submit as expected on Internet explorer - i have function creates form in javascript , submits it. works expected in safari, chrome, ff, & opera not ie 10. when submits browser not pointed url in action attribute in ie. i'm sure lame can't find problem help appreciated. function checkout() { var mydoc = 'some xml info send' var form = document.createelement("form"); form.setattribute( "method", "post" ); form.setattribute( "action", "http://domain.com/script.php" ); var hiddenfield = document.createelement("input"); hiddenfield.setattribute( "type", "hidden" ); hiddenfield.setattribute( "name", "myfield" ); hiddenfield.setattribute( "value", mydoc ); form.appendchild(hiddenfield); form.submit(); } thanks help!!! you're creating form, you're not appendi

Getting "No query executer factory registered for the 'plsql' language" Exception from Java code -

Getting "No query executer factory registered for the 'plsql' language" Exception from Java code - i have simple study displays fields database. have setup info adapter in jasper , set query. can preview study jasper, when comes java couldn't compile study , show next exceptions jun 18, 2014 3:17:49 pm org.apache.commons.digester.digester endelement severe: end event threw exception caused by: net.sf.jasperreports.engine.jrruntimeexception: no query executer mill registered 'plsql' language. java.lang.reflect.invocationtargetexception jun 18, 2014 3:17:49 pm me.jasper.print.statementprint generatereport severe: null net.sf.jasperreports.engine.jrexception: org.xml.sax.saxparseexception; linenumber: 7; columnnumber: 16; error @ line 7 char 16: no query executer mill registered 'plsql' language. caused by: org.xml.sax.saxparseexception; linenumber: 7; columnnumber: 16; error @ line 7 char 16: no query

encryption - AES shared Key with RSA public Key -

encryption - AES shared Key with RSA public Key - i found public private key encryption tutorial here. tutorial uses rsa public key algorithm , aes shared key algorithm. i thinking of designing client,server architecture client keeps private key, server keeps public key. username + salt encrypted private key , sent server along aes shared key. server uses aes shared key + public key decrypt information. method secure ? there improve way utilize public-private-key authentication ? i think supposed encrypt info public key, , decrypt private key of server. public key definition 1 exposed everyone, in case can decrypt message sent client, including aes key. encryption aes rsa

python - Logging module ValueError: Unable to configure handler 'console' -

python - Logging module ValueError: Unable to configure handler 'console' - i trying figure out how web scraping/crawling python, downloaded crawler found on github see how worked, it's called pycrawler , code here. when seek execute it, folowing error: traceback (most recent phone call last): file "<stdin>", line 1, in <module> file "pycrawler.py", line 18, in <module> logging.config.dictconfig(logging) file "c:\python27\lib\logging\config.py", line 803, in dictconfig dictconfigclass(config).configure() file "c:\python27\lib\logging\config.py", line 585, in configure '%r: %s' % (name, e)) valueerror: unable configure handler 'console': must string, not none there's no none value in console dictionary, suppose gives error because reason can't read properly, can't figure out why. do have colorstreamhandler.py in folder (or available on python's

How to return to line in file java -

How to return to line in file java - i need add together items combobox externel file (java).my problem read first line , code: file names_file = new file("data" + file.separator + "c://users//hatem//desktop//fichadr.txt"); fileinputstream fis = null; bufferedinputstream bis = null; datainputstream dis = null; string str_data = ""; //for storing input file. seek { fis = new fileinputstream("c://users//hatem//desktop//fichadr.txt"); // here bufferedinputstream added fast reading. bis = new bufferedinputstream(fis); dis = new datainputstream(bis); str_data = dis.readline(); //reading line file. stringtokenizer st = new stringtokenizer(str_data); //tokenizing line. //the below line adds 1 item. objective adding items. //*** requesting help here *** jcombobox1.additem(st.nexttoken("|")); //*** requesting help here *** // disposing , closing resources after using them. fis.close(); bis.close();

php - Use the same page for multiple taxonomies -

php - Use the same page for multiple taxonomies - i need utilize same page different taxonomies , terms. how can retrieve taxonomies , terms url , run same page i want? the query should run through url since not using forms. when user clicks on link, new page should opened archive of posts having custom post type, taxonomy , taxonomy terms specified in url. this code have right now: <? /* * template name: activities template * description: template activties restaurants, pubs, etc. */ ?> <?php $options = get_option('mh_options'); ?> <?php get_header(); ?> <?php if ( get_query_var('paged') ) {$paged = get_query_var('paged');} if ( get_query_var('page') ) {$paged = get_query_var('page');} $args = array( 'post_type' => 'activties', 'tax_query' => array( array( 'taxonomy' => 'restaurants', 'field' => 'slug', '

php - Symfony2 Forms conditional validation on empty fields -

php - Symfony2 Forms conditional validation on empty fields - i've created form has fields, required status dependend on value entered field (to specific, whether value > 0). it ordering textbook , if quantity > 0, address-related fields must entered. i've added custom validation callback, can check whether count > 0 , adds violation. gets executed if field not empty (since not "required"). is there way validate, without having utilize required flag on field? below snippet: [...] $builder->add('firstname', 'text', array( 'label' => 'label.firstname', 'required' => false, 'property_path' => 'order.firstname', 'constraints' => array( new callback(array('callback' => array($this, 'validateorder'))) ) )); [...] public function validateorder($data, executioncontextinterface $context) { /** @var \symfony\component\form\for

css - Foundation: vertical sub-nav -

css - Foundation: vertical sub-nav - is possible create vertical sub-nav? in doc page there's horizontal 1 , can't find out how display elements vertically edit: here link foundation docs: http://foundation.zurb.com/docs/components/subnav.html and original css (extracted foundation.css): .sub-nav { display: block; width: auto; overflow: hidden; margin: -0.25rem 0 1.125rem; padding-top: 0.25rem; margin-right: 0; margin-left: -0.75rem; } .sub-nav dt { text-transform: uppercase; } .sub-nav dt, .sub-nav dd, .sub-nav li { float: left; display: inline; margin-left: 1rem; margin-bottom: 0.625rem; font-family: "helvetica neue", "helvetica", helvetica, arial, sans-serif; font-weight: normal; font-size: 0.875rem; color: #999999; } .sub-nav dt a, .sub-nav dd a, .sub-nav li { text-decoration: none; color: #999999; padding: 0.1875rem 1rem; } .sub-nav dt a:hover, .sub-nav

parsing - How to parse current PHP file after it is loaded? -

parsing - How to parse current PHP file after it is loaded? - i have php page receives post attributes.this page rendered depending upon these attributes. want source code of php page after populated received attributes. page plain html code after has been parsed php parser. have referred file_get_contents , php simple html dom parser couldn't find acceptable answer. what want raw html code after has been parsed php parser example echo "<p>hi<p>" and page return <p>hi</p> i want output above. you need utilize php's output command functions output generated php. example: <?php // here on, maintain output in buffer ob_start(); // output whatever want echo "<h1>hello world!</h1>" . php_eol; echo "<p>how're doin' today?</p>"; // store contents of buffer in $output $output = ob_get_contents(); // clear buffer , stop buffering output ob_end_clean();

javascript - Print function stops jquery post -

javascript - Print function stops jquery post - i working on web application in codeigniter. posting controller using jquery post function , in next line calling print function. when comment print function jquery post working fine, otherwise jquery post not working. am getting error in chrome : request headers caution provisional headers shown my code: $.post("<?=base_url()?>appointments/getappointmentcount", {'customer_code':customer_code}, function(data) { alert(""); var appocountobj = json.parse(data); console.log(appocountobj); printbill(); }); function printbill() { /*print bill in popup*/ var printcontent = $("#previewbillmodal .modal-body").html(); var mywindow=window.open('', 'printwindow', 'width=950,height=850,top=50,left=50,toolbars=no,scrollbars=yes,status=no,resizable=yes,minimizable=no'); mywindow.document.writeln('<!doctype html>'); mywindow.document.writeln('<html&g

Reading from a server in a list/details Fragment in Android -

Reading from a server in a list/details Fragment in Android - i'm using code/concept : android fragments what wanting accomplish is, on item selected (as seen below), want send item server, have process on side (which can do) , retrieve string sent , utilize string update details part of list/details fragment. there help me in achieving through code? my code far follows: public class mainactivity extends fragmentactivity implements headlinesfragment.onheadlineselectedlistener { xmlcreator x = new xmlcreator(); /** called when activity first created. */ public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.news_articles); // check whether activity using layout version // fragment_container framelayout. if so, must add together first fragment if (findviewbyid(r.id.fragment_container) != null) { // however, if we're beingness restored previous state, // don

Connecting Arduino and Android Bluetooth -

Connecting Arduino and Android Bluetooth - i tried connect arduino , android via bluetooth , it's working pretty good. while initialising connection wrote setup in arduino don't know how phone call it. void setup() { // set setup code here, run once: genotronex.begin(9600); genotronex.println("bluetooth on please press 1 or 0 blink led .."); pinmode(ledpin,output); } here code in android void beginlistenfordata() { final handler handler = new handler(); final byte delimiter = 10; //this ascii code newline character stopworker = false; readbufferposition = 0; readbuffer = new byte[1024]; workerthread = new thread(new runnable() { public void run() { while(!thread.currentthread().isinterrupted() && !stopworker) {

sql - Select first and last record each day -

sql - Select first and last record each day - i have table engineerid, datetimecreated datetime, jobid , audittypeid i need query shows first (engineerid, jobid audittypeid 1) , lastly (engineerid, jobid audittypeid 2) on each row of query. select top (100) percent dbo.audittrail.engineerid, dbo.audittrail.audittypeid, dbo.engineers.name, dbo.engineers.engineertypecode, dbo.audittrail.jobid, cast(dbo.audittrail.datetimecreated date) _date dbo.audittrail inner bring together dbo.engineers on dbo.audittrail.engineerid = dbo.engineers.engineerid (dbo.audittrail.audittypeid = 1) , (dbo.engineers.engineertypecode = 'p') , (dbo.engineers.engineertypecode = 'p') , (datepart(mm, dbo.audittrail.datetimecreated) = 6) , (datepart(yyyy, dbo.audittrail.datetimecreated) = 2014) grouping audittrail.engineerid, jobid, audittypeid, engineers.name, engineers.engineertypec

php - using jQuery affects all my content -

php - using jQuery affects all my content - i utilize code load links jquery. applies <a></a> . how skip of <a></a> script? $("a").on("click", function(e) { e.preventdefault(); var sectionid = '#'+ $(this).data("section"); $("#content section:visible").fadeout('normal'); $(sectionid).fadein('normal'); }); }); there 2 ways accomplish goal. 1 . opt in links: <a href="#" class="special test foo">function execute</a> <a href="#" class="special">function execute</a> <a href="#" class="special">function execute</a> <a href="#" class="bar special">function execute</a> <a href="#">function not execute</a> <a href="#" class="foo">function not execute</a> js: $("a.special").on("

android - Do mobile games have only one ad that they toggle on off throughout the entirety of the game? -

android - Do mobile games have only one ad that they toggle on off throughout the entirety of the game? - i adding ads game making , wondering how works? have multiple ads each set specific part of game i.e menu, pause, store , whatnot? or have 1 advertisement toggle on if user in menu , off when player playing game? i don't think matters , more depends on app. for me , libgdx game, have single style of advertisement across whole app. basic banner used on , on , on 1 time again in same style whenever need it. easier games whole game (main screen, game screen, pause etc) rendered on 1 canvas need 1 android layout entire game. however, might have different formats/sizes of advertisement in different places - e.g. 320x50 on main game screen interstitial on menu page. if case i'd go separate advertisement units each style of ad. android libgdx admob

internet explorer - Bootstrap Glyphicons icons not rendering in IE on server -

internet explorer - Bootstrap Glyphicons icons not rendering in IE on server - i create question share recent knowledge of weird ie behaviour. an intranet web application (asp.net) under construction myself , glyphicons on page. when run website on localhost, using visual studio, no problem appear. but when deploy on iis server, icons not rendering anymore. situation 1: on server situation 2: on localhost this problem appear in ie (v. 8 here) when viewing on server. firefox , chrome work properly, rendering icons in both server , localhost case. i search , find many possible solutions (mime types, fonts format, eso) nil resolve problem. if want solve problem without having user create modification, have add together new http response header in iis. here steps so: open iis click on http response headers add setting name: "x-ua-compatible" , value: "ie=edge" done make sure inquire user clear cache , restart browser (pretty of i

c++ - Refactoring fields of anonymous unions using clang lib -

c++ - Refactoring fields of anonymous unions using clang lib - i'm doing little refactoring tool assist me automated c code generation , i'm using clang api that. developed tool works 1 specific test case: typedef int mytype; typedef float mytype2; union ab { mytype a; mytype2 b; }; int fun(int); int foo(mytype bar) { homecoming fun( ((union{ mytype a; mytype2 b; })bar).a ); } in code want refactor "mytype" occurrences new "mytype3", way i'm doing creating typeloc ast matcher ( typeloc().bind("id") ) find types , replace them refactoringtool (standard refactoring procedure found everywhere on internet). specific case ast doesn't seem contain definition anonymous union beingness used casting, dumped ast using xclang: `-functiondecl 0x6b757f0 <line:12:1, line:15:1> line:12:5 foo 'int (mytype)' |-parmvardecl 0x6b75730 <col:9, col:16> col:16 bar 'mytype':'int' `-c

vb.net - Socket property that returns IP address/Port -

vb.net - Socket property that returns IP address/Port - i trying string representation of ip address , port socket has been initialized with. using info print in message box user if error occurs. using winsock command in vb6 next code used: "could not open tcp connection " & frmmain.winsock1.remotehost & ":" & frmmain.winsock1.remoteport any help @ appreciated. the socket not know remote ip/port until connects server. have provide destination connect() method first. if connect() fails, have know destination provided can study it, cannot query socket it. if connect asynchronously, have remember destination somewhere can retrieve when needed. however, if connect() succeeds, can query remoteendpoint property actual ip/port socket connected to. particularly useful when connecting hostname, find ip address hostname resolved to. vb.net sockets ip-address

iOS Paypal response id i don't take -

iOS Paypal response id i don't take - hello i'm using paypal sdk xcode , ios everything works success want take response id how can add together response id nsstring value. please help me i'm writing output. my codes (paypalpayment *)completedpayment { nslog(@"paypal payment success!"); self.resulttext = [completedpayment description]; kod = [completedpayment description]; nslog (@" \n\n\n\ndesc = %@\n\n\n ",kod); output currencycode: usd amount: 43.45 short description: surprise intent: sale processable: processed display: $43.45 confirmation: { client = { environment = sandbox; "paypal_sdk_version" = "2.1.2"; platform = ios; "product_name" = "paypal ios sdk"; }; response = { "create_time" = "2014-06-20t11:15:56z"; id = "pay-2g6302017m038104ykosbp3a"; intent = sale; state = appr

asp.net mvc 4 - Hide the add/edit Action Link in view based on the user roles roles -

asp.net mvc 4 - Hide the add/edit Action Link in view based on the user roles roles - how can enable or disable add/edit/delete action link in asp.net mvc razor view based on user roles. have tried next seems not working while updating user role. if have updated user role, updated value did not refresh.it still work old value.how can resolve issue? if (user.isinrole("admin")) { } in view, check following: @{ //replace admin administrator role if (user.isinrole("admin")) { @html.actionlink("edit", "edit", new { id=item.id }) | @html.actionlink("details", "details", new { id=item.id }) | @html.actionlink("delete", "delete", new { id=item.id }) } } with administrators can see whasts within code block, not mean, users not manually come in url in browser. still reachable. should probalby secure controllers / action methods well: using sy

HTML Tables and Table Data Alignment -

HTML Tables and Table Data Alignment - i trying create table, has 4 columns , multiple rows. when seek add together more info table, info not drop under right header. info suppose fall under 3rd table header falling under bottom of info under first header. here code. <table> <table style="width:800px"> <tr> <th><h4>i.t. department</h4></th> <th><h4>accounting department</h4></th> <th><h4>tax filings & surplus lines department</h4></th> <th><h4>licensing department<h4></th> </tr> <tr> <td align="center" rowspan="2"><br>test test<br>i.t. manager<br>xxx-xxx-xxxx<br><br> <br>test test<br>i.t. operations supervisor<br>xxx-xxx-xxxx</td></tr> <tr><td align="center" rowspan="2">test test<br>acc

java - JSONArray error getting -

java - JSONArray error getting - i have login system, , nullpointerexception after getting response or in process request generation. login request is: try { if (json.getstring(key_success) != null) { string res = json.getstring(key_success); if(res == "sucess"){ pdialog.setmessage("loading user space"); pdialog.settitle("getting data"); userfunctions logout = new userfunctions(); logout.logoutuser(getapplicationcontext()); intent upanel = new intent(getapplicationcontext(), main.class); upanel.addflags(intent.flag_activity_clear_top); pdialog.dismiss(); startactivity(upanel); finish(); }else{ pdialog.dismiss();

creating google chrome shortcut with --disable-web-security -

creating google chrome shortcut with --disable-web-security - i tryin access local files via jquerymobile, works fine in forefox , ie chrome gives security exception. can open chrome disabled security mode access local files using c:\program files\chrome\chrome.exe --disable-web-security or run via this chrome.exe --disable-web-security but there way can create shortcut on dsktop alsways open chrmoe in disabled security mode..? just clone shortcut chrome have on desktop, , in shortcut properties add together parameter --disable-web-security @ end of chrome executable path e.g "c:\program files\google\chrome\application\chrome.exe" --disable-web-security edit #1 : changed google chrome path, old 1 not correct. tried on xp fresh chrome installed, got error message flag not supported. edit #2 : http://peter.sh/experiments/chromium-command-line-switches/ google-chrome

Higher Order Voronoi Diagrams in MATLAB -

Higher Order Voronoi Diagrams in MATLAB - matlab has first-class function, voronoi/voronoin drawing first order voronoi diagrams. unfortunately, there no built in alternative higher order diagrams. understand in principle how obtain higher order diagrams, implementation in matlab seems messy. know of easy way in matlab? preliminary searches yielded no matlab-language-specific implementation (although there abstract implementation material). this strikes me odd useful kth-order v. diagram not "out of box" implementable in matlab thought check experts first see if i'm not missing something... before spend untold number of hours reinventing wheel. p.s. there 2 other questions in stack exchange i've found regarding subject no resolution. participants "gave up" in trying figure out. hard of question? you can find little illustration of higher order voronoi diagram website:http://www.nirarebakun.com/voro/ehivoro.html. thought utilize counte

sql server 2008 r2 - I can't view the primary key on my table -

sql server 2008 r2 - I can't view the primary key on my table - i'm new sql server (i'm learning sql server 2008), have question: i have database "two trees test" 2 tables in ( employee & product ), design of employee table: employeeid int not null (primary key) firstname nvarchar(50) not null lastname nvarchar(50) not null title nvarchar(50) not null hiredate date null birthdate date null phone nvarchar(20) null status bit not null you can see have primary key ( employeeid ), if go edit view (so can start insert data), can't see primary key. thanks in advance help & apologies if misspelled (english isn't first language), tried attach screenshots can't because don't have 10 points yet. maybe primary key auto-increment might not allow come in value it. see this give custom values primary column. sql-server-2008-r2 pr

compilation - Error linking to mongo-c-driver library while building collected performance monitoring package -

compilation - Error linking to mongo-c-driver library while building collected performance monitoring package - i trying build collectd scheme performance monitoring bundle (version 5.4.1; building collectd on fedora v20 vm) , want utilize write_mongodb plug-in. i run ./configure in folder collectd-5.4.1 have download bundle source files cannot write_mongodb back upwards due next error (as seen in config.log file of collectd folder): /home/user01/documents/libs/collectd-5.4.1/conftest.c:181: undefined reference 'mongo_run_command' i trying link mongo-c-driver library, compiled generate libmongoc-1.0.so.0.0.0 (version 0.96.4). i made next modifications in script configure link libmongoc: libmongoc_cppflags="$libmongoc_cppflags -i/usr/local/include/libmongoc-1.0/ -i/usr/local/include/libbson-1.0/" libmongoc_ldflags="$libmongoc_ldflags -l/usr/local/lib/ -l/usr/local/lib/" and copied file mongoc.h folder /usr/local/include/libmon

asp.net mvc - Umbraco: How do I include the generated files after install? -

asp.net mvc - Umbraco: How do I include the generated files after install? - i have installed umbraco via nuget empty project. ran project installation started. after installation ran there lots of generated files have included them in project can utilize source control. i ran project 1 time again , got error: could not load file or assembly 'newtonsoft.json' there dll file in bin folder , reference. i think might because "packages" folder created nuget installation not included in project. not know how include this. does know should do? it turns out problem in newtonsoft.json file in nuget package. downloaded latest dll codeplex , fixed problem. asp.net-mvc visual-studio-2010 umbraco umbraco7

Capturing subset of a string using Python's regex -

Capturing subset of a string using Python's regex - i have string looks this: >bounded_rna_of:1ddl:elength : 1 regex wise can formed way: >bounded_rna_of:(\w+):(\w)length : 1 at end of day want extract 1ddl , e . but why regex failed? import re seq=">bounded_rna_of:1ddl:elength : 1" match = re.search(r'(>bounded_rna_of:(\w+):(\w)length : 1)',seq) print match.group() # prints this: # >bounded_rna_of:1ddl:elength : 1 what's way it? this due global catching parenthesis, should grab 2 needed elements. import re seq=">bounded_rna_of:1ddl:elength : 1" match = re.search(r'>bounded_rna_of:(\w+):(\w)length : 1',seq) print match.group(1), match.group(2) python regex