Posts

Showing posts from August, 2013

asp.net - Incorrect syntax near ',' (dbnull issue) -

asp.net - Incorrect syntax near ',' (dbnull issue) - it suppose there chart appeared. but, doesnt there problem regarding dbnull issue. happen when either 1 of 3 select statement has no data. dim user string = session("nomatrik") dim resultid object = session("max") dim idquery = "select max(resultid) id tblresult result_nomatric = @matric , result_quiz_id = 1 union " + "select max(resultid) id tblresult result_nomatric = @matric , result_quiz_id = 2 union " + "select max(resultid) id tblresult result_nomatric = @matric , result_quiz_id = 3" conn.open() dim cmdgetid new sqlcommand(idquery, conn) cmdgetid.parameters.addwithvalue("@matric", user) dim maxids sqldatareader = cmdgetid.executereader dim ids string = "" while maxids.read ids += maxids("id").tostring() + ",

java - Screen not created for drawstring text to display -

java - Screen not created for drawstring text to display - i working on java game development tutorials given on buckysroom.org. creating screen class, allows me go total screen. then, when seek paint text, screen not appear, , text shown on working window (eclipse) if comment out paint method or create paintcomponent, reddish screen appears, without text. can help me on how deal this? the screen class: import java.awt.*; import javax.swing.jframe; public class screen { private graphicsdevice vc; public screen() { graphicsenvironment env = graphicsenvironment.getlocalgraphicsenvironment(); vc = env.getdefaultscreendevice(); } public void setfullscreen(displaymode dm, jframe window) { window.setundecorated(true); window.setresizable(false); vc.setfullscreenwindow(window); if (dm != null && vc.isdisplaychangesupported()) { seek { vc.setdisplaymode(dm); } grab (exception ex) { } } } public window

Google cloud storage, Cache-Control -

Google cloud storage, Cache-Control - i tried set cache-control header google cloud storage bucket. gives me 400: invalid argument error without explanation wrong. ideas? example: gsutil setmeta -r -h 'cache-control:public, max-age=10000, no-transform' gs://example.com/stylesheets/ setting metadata on gs://example.com/stylesheets/site-77ee6060.css badrequestexception: 400 invalid argument tried different max-age, or without no-transform, same result. bucket configured website. google-cloud-storage

JQuery dynamically appending and removing rows in a table -

JQuery dynamically appending and removing rows in a table - i intern learning jquery , asked design basic webpage shows whether employees @ office. info displayed in table in form of employee name, yes/no buttons(if employees in office), , optional note employee is. user should able add together , remove employees. able remove employees table, having 2 issues. 1) cannot add together employees table 2) when added additional code add together employees, no longer able remove employees table. how prepare this? $(document).ready(function() { $(document).on('click', '.del', function() { $(this).parent().parent().remove(); }); $('.sub').click(function() { var name = $('input[name=name]').val(); var phone = $('input [name=phone]').val(); var email = $('input [name=email]').val(); var modal = "<td><button class=\"del\">x</button><a href=\"#openmodal\">&

python - PyInstaller Packages for kivy -

python - PyInstaller Packages for kivy - i have tried build bundle out of kivy application using pyinstaller. goal create bundle can execute on linux (ubuntu 14.04 64bit) , re-create other linux systems well. i tried execute pyinstaller whole night, tried various things , in end succeeded in creating bundle own system. first i'd know did functionally bundle app. my main.spec file looks this: # part kivy.tools.packaging.pyinstaller_hooks import install_hooks install_hooks(globals()) # -*- mode: python -*- # part b pyinstaller.hooks.hookutils import exec_statement hiddenimports = ['pysqlite2', 'mysqldb', 'psycopg2'] databases = exec_statement("import sqlalchemy.databases; print sqlalchemy.databases.__all__") databases = eval(databases.strip()) n in databases: hiddenimports.append("sqlalchemy.databases." + n) version = exec_statement('import sqlalchemy; print sqlalchemy.__version__') is_alch06 = version >= &

java - Why is maven-war-plugin failing for web.xml missing if I configured it not to fail on missing web.xml? -

java - Why is maven-war-plugin failing for web.xml missing if I configured it not to fail on missing web.xml? - here's challenge: why build failing? i have configured maven's maven-war-plugin not fail on abscent web.xml file, seems: <plugin> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-war-plugin</artifactid> <executions> <execution> <id>prepare-war</id> <phase>prepare-package</phase> <configuration> <failonmissingwebxml>false</failonmissingwebxml> <archiveclasses>false</archiveclasses> <archive> <manifest> <addclasspath>true</addclasspath> <classpathprefix /> </manifest>

osx - App reply not called when passing non-null parameter from NSXPCConnection -

osx - App reply not called when passing non-null parameter from NSXPCConnection - i'm using xpc seperate project 2 projects - main project, built os x @ 64-bit, , xpc service built os x @ 32-bit, using library not available 32 bit , cannot replaced. 2 communicate using nsxpcconnection. i have problem callbacks service main app: when reply takes complicated argument (i.e: class nsimage or nsdata), not called xpc service. there no error or exception, nil happens. occurs other way, i.e., when calling proxy object. not occur randomly, happens reply signatures, though im not sure which. i need pass nsimage in way between xpc service , main app. tried passing both nsimage , nsdata, reply not called (worth mentioning - beingness called when nil passed instead of real object). i tried sending pointer using [nsdata bytes] re-creating info using [nsdata initwithdata:length:]. when seek this, reply called, exc_bad_access when calling initwithdata. assume because of mess betwee

ios - CAShapeLayer in Interface Builder? -

ios - CAShapeLayer in Interface Builder? - i'm creating custom keyboard. option - create graphics keys back upwards platform. create separate graphics landscape mode - , swap them place when keyboard rotates. i'd prefer not have create graphics. option b - build custom uiview class utilizes cashapelayer create keys , resize accordingly when keyboard rotated. my problem have write lot of code position of keys programmatically. does create sense layout custom views in interface builder, size them appropriately, , have shape layer match bounds of view? or there improve way? i'd build 2 xibs - 1 landscape, 1 portrait , swap them on rotation. given may or may not see different screen sizes iphone6, i'd opt alternative b, write code 1 time , happy iphone6 ready on day 1. ios ios8 xcode6

javascript - How can I improve this script to delete a left over table? -

javascript - How can I improve this script to delete a left over table? - this script makes deletes content specific users forum. working intended there still left on element (table) deleted content. ideas highly appreciated. code: https://greasyfork.org/scripts/2690-fitmisc-total-ignore/code // ==userscript== // @name fitmisc_total_ignore // @author arris // @description script designed completly eradicate sight worst posters on fitmisc.com // @include http://fitmisc.com/* // @namespace http://fitmisc.com/ // @version 0.9 // ==/userscript== function canignore(suser) { if( suser.match(/niko/i) ) homecoming true; if( suser.match(/thesavagepony/i) ) homecoming true; if( suser.match(/lloyd banks/i) ) homecoming true; if( suser.match(/lil b/i) ) homecoming true; if( suser.match(/round-mound/i) ) homecoming true; homecoming false; } function setignorethread() { var a; var s; a=document.evaluate(

python - Finding square centers from a picture -

python - Finding square centers from a picture - after image processing, fft's, filters, , thresholding, obtained next image: so, i'm wondering how extract centers. exist function opencv? (such houghcircles detecting circles?) or need utilize clustering methods? maybe useful know code used: import cv2 import numpy np import scipy.ndimage ndimage scipy.ndimage import maximum_filter img = cv2.imread("pic.tif",0) s = np.fft.fftshift(np.fft.fft2(img)) intensity = 20 * np.log(np.abs(s)) maxs = maximum_filter(intensity, 125) maxs[maxs < intensity] = intensity.max() ret, thresh = cv2.threshold(maxs.astype('uint8'),0,255,cv2.thresh_binary_inv+cv2.thresh_otsu) imshow(thresh) ps: have question, useful of you. maximum_filter function gave me "3 squares"(then i'll improve visualization of them using thresholding), there way utilize maximum_filter function , obtain "3 circles"? can utilize houghcircles obtain 3 cente

what if Poco StreamSocket.available() returns 0? -

what if Poco StreamSocket.available() returns 0? - what situation streamsocket.available() homecoming 0? what should within case? should close connection, or ignore it? there guess scheme busy leading 0 bytes returned streamsocket. what should depends on logic of application. if available() returns 0 , expect data, means has not yet arrived , may want maintain on inquiring or phone call receivebytes() (which, if socket in blocking mode, block until info arrives). if receivebytes() returns 0, remote end has closed or reset connection , should drop it, too. poco-libraries

java - Combining Modules Android Application -

java - Combining Modules Android Application - i'm doing android project on eclipse , have 2 independent apps sources(modules). how combine these 2 modules, such when button (present on first app) clicked, sec app launched? far i've created button , that's it.any help appreciated. i'm beginner, please specific :) give thanks you! in manifest of sec app : <activity android:name=".mainactivitysecondapp" android:label="@string/app_name" > <intent-filter> <action android:name="com.external.intentreceiver" /> </intent-filter> </activity> and place next code within onclicklistener of button in first app : intent intent = new intent(); intent.setaction("com.external.intentreceiver"); context.startactivity(intent); so, when button clicked, intent of type com.external.intentreceiver fired. mainactivitysecondapp open since meant handle such intents defined

c++ - Are objects inside rvalue referenced object, also rvalue referenced? -

c++ - Are objects inside rvalue referenced object, also rvalue referenced? - are objects within rvalue referenced object, rvalue referenced? struct a{ }; struct b{ a2; }; //template<class b> void test(b &&b){ // 1. right way? auto &&in3 = std::forward<b>(b).a2; std::cout << std::is_rvalue_reference<decltype(in3)>::value; // homecoming true // 2. or this? auto &&in4 = b.a2; std::cout << std::is_rvalue_reference<decltype(in4)>::value; // homecoming false } test(b()); http://coliru.stacked-crooked.com/a/bcf0f7dc4cc0440e yes, members of rvalues rvalues. clarified dr 421 but irrelevant here: auto &&in4 = b.a2; b not rvalue, it's lvalue (simple rule of thumb: has name). to restore value category had when passed function need forward it c++ c++11 rvalue-reference

Obtain width in draggable function SVG.js -

Obtain width in draggable function SVG.js - i know can obtain width or size function, i'm trying in moment of creation of draggable object. i'm doing because need give grid effect element , create remain within drawable area. here similar i'm trying do: square = draw.rect(size, size).x(x).y(y).draggable(function(x, y){ var xend = x - x % size; var yend = y - y % size; if(xend < 0) xend = 0; if(yend < 0) yend = 0; if(xend > 1000) xend = 1000 - width*; homecoming { x: xend, y: yend } }); the var * want get. also great know how allow svg.js elements interact jquery, guess that's question. edit: well, in fact need access other properties of element, if can't draggable element think should way create draggable? :( please help! the solution (as nils said), utilize square.bbox function, example: square = draw.rect(size, size).x(x).y(y).draggable(function(x, y){ var xend = x - x % size; var yend = y - y % size;

java - Configuring a Provider that returns a generic type in Guice -

java - Configuring a Provider that returns a generic type in Guice - i'm trying set provider daos created using jdbi. jdbi uses handle object (which wrapper around jdbc connection ) , can hold of dao using handle.attach(mydaotype.class) . rather having write separate provider implementation every dao class thought create sense this: public class daoprovider<t> implements provider<t> { private final class<t> daotype; private final handle handle; @injected public daoprovider(class<t> daotype, handle handle) { this.daotype = daotype; this.handle = handle; } @override public t get() { homecoming handle.attach(daotype); } } but seems tremendously hard wire guice. have tried using @assisted annotation on 1st constructor argument suggested in this answer. defined mill this: public interface daoproviderfactory { <t> daoprovider<t> create(class<t> daotype); } but it's not clear how shoul

java - why I get this error while starting eclipse -

java - why I get this error while starting eclipse - i have 64 bit window 7 , i have installed java 6 , java 7 (jdk , jre) in programme files(86) , jre 7 in programme files. i cannot open eclipse, start it? in 64 bit windows - program files(86) -> contains 32 bit programs installed system. program files -> contains 64 bit programs or default installed system what need 64 bit jdk, download here - link exe - jdk-7u60-windows-x64.exe ^^^^^ java eclipse

JQuery mobile - can I detect scrollstart on the page content rather than the document? -

JQuery mobile - can I detect scrollstart on the page content rather than the document? - i trying observe scrollstart using jquery mobile, if utilize next works: $(document).bind("scrollstart", function() { console.log("scroll start detected"); }); however logs every time entire page scrolled. want observe scroll on page content rather when whole page (document) scrolls. i have tried various attempts follows: $("#mycontent").bind("scrollstart", function() { console.log("scroll start detected"); }); $("#mypage").bind("scrollstart", function() { console.log("scroll start detected"); }); but nil seek seems work except using document. possible observe scrollstart on other document? you must set selections in quotation: $('#mycontent').bind("scrollstart", function() { console.log("scroll start

Where to place Finally with try catch block in java -

Where to place Finally with try catch block in java - i'm test web application finding element webdriver , want know if first element not found want go on executing sec code, placed code, after placeing finally, code stops execute , did not go on sec step. please help, give thanks here code: // ---first step----------------------------------------- seek { driver.findelement(by.classname("label")).isdisplayed(); system.out.println(" label displayed"); } grab (nosuchelementexception e) { system.out.println("label not displayed"); } { system.out.println("go next step"); } driver.findelement(by.classname("label")).click(); thread.sleep(3000); // ---second step------------------------------------------ seek { driver.findelement(by.linktext("resumé")).isdisplayed(); system.out.println("resumé displayed"); } grab (nosuchelementexception e) { system.out.println("resu

ruby on rails 4 - Polymorphic relationship - what is stored in the type attribute? -

ruby on rails 4 - Polymorphic relationship - what is stored in the type attribute? - let's have polymorphic relationship this: class image < activerecord::base belongs_to :imageable, polymorphic: true end class employee < activerecord::base has_many :pretty_pictures, as: :imageable end class productinvoice < activerecord::base has_many :pretty_pictures, as: :imageable end and migration image model: class createpictures < activerecord::migration def alter create_table :pictures |t| t.string :name t.references :imageable, polymorphic: true t.timestamps end end end let's have @product_invoice :id of 1 , have @picture belongs product. know @picture.imagable_id should equal 1, value stored in @picture.imagable_type be? 'productinvoice' 'productinvoices' 'product_invoice' 'product_invoices' via g.b in comments 'productinvoice' ruby-on-rails-4 polymorphism ha

ios - Assigning pubnub lobby to a specified group of users. -

ios - Assigning pubnub lobby to a specified group of users. - hi working on ios application uses pubnub several different forms of messaging. right need guidance on how go setting scheme selected user setup his/her own public channel access specified lobby chat user. lets illustration there public speaker @ event. users given specified code in audience able send speaker messages. user interface stand point: user have view in app requests code (i.e. speaker3) user inputs code , transitioned 1way chat view lets user send messages. user not able recieve messages speaker or see messages have been sent other users. speaker recieves messages users questions: is possible? what can utilize implement such scheme using pubnub? does have ideas on how implement such system? thanks lot help. it's totally possible, pubnub perfect this. in case user must know speakers channel name, it's of import because without not able send him message. since user knows speaker

html - Organizing My Modal, Cannot add a TH column in Table -Bootstrap 3 -

html - Organizing My Modal, Cannot add a TH column in Table -Bootstrap 3 - i having problem organizing modal. right displays in 1 big column such as i game info set column, such as i need spread out horizontally having them stacked on top of each other looks messy since runs off screen. i have tried wrapping them in additional tr , th tags, error saying element th cannot nested within element table . here jsfiddle tries mock setup. (this not include additional wrapper tr , th tags errors about) user info includes name bio, , game info includes twitch.tv required notice. thank help! edit my effort in nutshell <table> <tr> <th> user info </th> <th> game info </th> </tr> </table> all 4 th tags either missing start/end tags, or cannot nested within table . had add together additional tables around info in order compiler it. <table> <tr> <th> <table id=&qu

python - Specifying order of Django signal receivers -

python - Specifying order of Django signal receivers - i'm sending signal out , have 2 functions (each in own app) receivers signal , should run when signal sent. there way of specifying order in these receivers run? know changing order of installed_apps in settings.py file can alter when they're registered, there more elegant way? python django signals

c# - Logic to prevent insertion if there are no available slots -

c# - Logic to prevent insertion if there are no available slots - i'm developing application in asp.net c# , i'm trying figure out best way implement logic statement stop scheme allowing reservation taken if trailer canoes , kayaks full. issue trailer hold canoes , kayaks, there's lot of different combinations. there 5 "rows" on trailer count upwards vertically, , 2 "columns" dissect 5 rows in middle. draw diagram show looks like, , boats can go where. "c" stand canoe , "k" stand kayak. trailer looks this: class="lang-none prettyprint-override"> c only|c } ______|______ } boat trailer 1c\2k|1c\2k } ______|______ } 1c\2k|1c\2k } ______|______ } 1c\2k|1c\2k } ______|______ } c only| c } ______|______ } so question is, what's best alternative far coding , logic concerned not take more "reservations" when trailer full? application .aspx form insert command sql server tak

windows - Remotely running "vmrun command" on server machine from jenkins -

windows - Remotely running "vmrun command" on server machine from jenkins - i have windows 7_x64 virtual machine on server machine running on windows server 2008 r2. want run vm jenkins (ci tool executes batch file, running on same server). using vmrun utility so. when run vmrun -t ws -gu *** -gp *** start "vmx file path.vmx" this executes fine on server command prompt (locally). when seek exceute same of client machine (by visiting jenkins site) get error: there error in communication after troubleshooting, can vmrun command not responding whenever evoked remotely. confusing me, because have jenkins running commands installed on same server. running job lean client. how create difference? could help me troubleshooting issue? thanks! for reference: *server machine(host): windows server 2008 r2 *virtual machine(guest): windows 7 x64 *jenkins : installed on same server (host) *client : remote windows machine, accesses jenkins instan

mysql - using variables as strings in stored procedure -

mysql - using variables as strings in stored procedure - how utilize variables represent string values in mysql? stored procedure below has 2 variables @varname , @file1 . uses concat() create string @file1 , none of these string values populating script. (the query not loading results , outfile not beingness created.) how can prepare code works? delimiter $$ drop procedure if exists `parse_descriptions`$$ create procedure `parse_descriptions`() begin set @varname='something'; set @file1= concat('d:/mypath/','@varname'); select d.id, d.term, d.conceptid dtablename d term '%@varname%' outfile concat('@file1','_test.txt') fields terminated '\t' optionally enclosed "" lines terminated '\r\n' ; end$$ phone call `parse_descriptions`()$$ drop procedure if exists `parse_descriptions`$$ other misplacing quotes in few places around parameters have commented biggest problem trying uti

SQL select all dishes matching ingredient criteria -

SQL select all dishes matching ingredient criteria - im starting have headache figuring/searching query select dishes matches list of ingredients. my tables: ingredients ============ id ingredientname ingredientamount p_id dishes ========== id dishname dishingredients ========== id dishid ingredeientid ingredientamount having i.e. 2 ingredient names, want select dishes ( want know p_id's ) can create ( there many dishes subset of given i.e. 5 ingredients.) up moment have following: select d.name, i.ingredientname, di.ingredientamount dishes d inner bring together dishingredients di on d.dishid = di.dishid inner bring together ingredients on di.ingredientid = i.id i.ingredientname in ('salt','tomato') although show dishes require 'tomato' , require other ingredients, dont have on list. what create table dishingredients , columns dishingredientid , dishid , ingredientid , move ingredientamount table. because, instance, m

spring - Why would Hibernate throw a WrongClassException when the FlushMode is set to MANUAL? -

spring - Why would Hibernate throw a WrongClassException when the FlushMode is set to MANUAL? - consider next scenario - there 2 tables (identical in schema) called activeissue , resolvedissue . when issue active, in activeissue table , when issue resolved, moved resolvedissue table. issues can related each other. i have method next - get related issues issue activeissue get related issues issue resolvedissue before calling method, set session.setflushmode(flushmode.manual) avoid next scenario - get related issues activeissue in background, issue x gets resolved , moves activeissue resolvedissue get related issues resolvedissue (leads conflict because of issue x) however, observe run wrongclassexception logic in place. instance, org.hibernate.wrongclassexception: object id: 123456 not of specified subclass ... activeissue (loaded object of wrong class ... resolvedissue) i using org.springframework.orm.hibernate3.support.hibernatedaosupport , phone call

php - Doctrine 2 @Id @GeneratedValue issue -

php - Doctrine 2 @Id @GeneratedValue issue - so though have resolved own issue, know if did right way or not? i'm using code doctrine docs insert new record database code looks , looping on xlsx beingness process phpexcel. i have set entity /** * @var integer $id * * @column(name="uploaduserid", type="integer", nullable=false) * @id * @generatedvalue(strategy="identity") */ private $id; -- $user = new \uploaduserdetails(); $user->id = 0; $user->userid = $item->userid; $user->email = $cells['a']; $user->firstname = $cells['b']; $user->lastname = $cells['c']; $user->street = $cells['d']; $user->city = $cells['e']; $user->state = $cells['f']; $user->zip = $cells['g']; $user->mobile = $cells['h']; $entitymanager->persist($user); $entitymanager->flush(); now, though works , record appears in database (mariadb), bit

Django average scores with through -

Django average scores with through - maybe newbie question, stuck in point. not know if problem model or not understand aggregations , annotations. i have model this: class user(models.model): collection = models.manytomanyfield(book, through='bookcollection') class book(models.model): name = models.charfield(max_length=200) class bookcollection(models.model): user = models.foreignkey(user) book = models.foreignkey(book) score = models.integerfield(default=0) i want score average books , users, excluding ones has default score equals 0 (this value represents user has book in collection, has not been rated). trying utilize annotation this: book.objects.exclude(collection__score=0).annotate(avg=avg('collection__score')) but if there book rated 0 , 3, example, both entries excluded. is there way tell avg() should take business relationship values greater 0? thanks in advance. there no wa

shell - Checking availability of DB2 database via db2cli -

shell - Checking availability of DB2 database via db2cli - i seek check availability of db2 instance via db2cli -utility, follows db2cli execsql -user user -passwd passwd -connstring database:host:port (with actual values uppercased text). expect connect host:port, using credentials user , passwd, , switch database database. as result get sqlerror: rc = 0 (sql_success) sqlgetdiagrec: sqlstate : 08001 fnativeerror : -1024 szerrormsg : [ibm][cli driver] sql1024n database connection not exist. sqlstate=08003 cberrormsg : 82 but: these values work, on same machine, if utilize them credentials in applications connect db2, expect connection given command. my question is: using db2cli wrong? you can seek validate connect below(it create sure if connection successful) db2cli validate -dsn sample -connect db2cli.ini : [sample] hostname=host pwd=password port=portnumber protocol=tcpip database=dbname uid=username

java - how to solve discovering other device via Wi-Fi (android API)? -

java - how to solve discovering other device via Wi-Fi (android API)? - recently follow steps given developer.android.com but seems have few luck on there. tried find available peers nearby, set 'em arraylist seems no luck. didnt anything. my actual 2 devices android 4.1 , 4.2 since wifi direct based on api level 14 android 4.0+ think real device not problem. the concept utilize using 1 activity , 1 broadcast receiver. please take @ code, did set wrongly or forgot? chat1activity.java package com.example.androtut; import java.util.arraylist; import others.mybroadcastreceiver; import android.app.activity; import android.content.broadcastreceiver; import android.content.context; import android.content.intentfilter; import android.net.wifi.p2p.wifip2pdevicelist; import android.net.wifi.p2p.wifip2pmanager; import android.net.wifi.p2p.wifip2pmanager.channel; import android.net.wifi.p2p.wifip2pmanager.peerlistlistener; import android.os.bundle; import android.vi

Not able to identify a lenghty linktext in selenium webdriver -

Not able to identify a lenghty linktext in selenium webdriver - i want identify element linktext, facing unusual issue if linktext value short i.e addfirst , addlast able locate element using driver.findelement(by.linktext("addlast, addfirst")).click if linktext addmanualreferraltocheckthelenghtf , addmanualreferraltocheckthelenghtf lengthy above not able identify element please help me find solution why don't seek partial link text. driver.findelement(by.partiallinktext("addlast, addfirst")).click selenium selenium-webdriver

javascript - How to make sure the overflow css property is hidden in the kendo grid when an iframe is loaded before the container div is shown on IE10? -

javascript - How to make sure the overflow css property is hidden in the kendo grid when an iframe is loaded before the container div is shown on IE10? - i have set of tabs load content within iframes. when select 1 of tabs frame loaded before making container div show next behavior occurs in ie10: images: i able reproduce issue using next code: html: <div style="display: none;"> <iframe src="http://demos.telerik.com/kendo-ui/grid/index" frameborder="0" style="height:1000px; width:100%; z-index: -1;"></iframe> </div> javascript: $(function() { settimeout(function () { $("div").css('display', 'block'); }, 2500); } javascript html css kendo-grid internet-explorer-10

bash - sed: using a variable for command and address -

bash - sed: using a variable for command and address - while trying write bashscript on ubuntu came across next issue: iconname="'application:\/\/nautilus.desktop'" echo "iconname: $iconname" sedvariable=\"s/$iconname[,]*//\" echo "sedvariable: $sedvariable" settings com.canonical.unity.launcher favorites | sed ${sedvariable} i error saying "unknown command" sed: -e ausdruck #1, zeichen 1: unbekannter befehl: `"' however, variable "sedvariable" looks fine this: sedvariable: "s/'application:\/\/nautilus.desktop'[,]*//" when entering command manually works fine gsettings com.canonical.unity.launcher favorites | sed "s/'application:\/\/nautilus.desktop'[,]*//" why sed not take command variable? suggestion! please seek this sedvariable="-e s/$iconname[.]*//" gsettings com.canonical.unity.launcher favorites |

php - html table drag and drop not working in zend framework -

php - html table drag and drop not working in zend framework - i followed link re-ordering of tables. http://www.webresourcesdepot.com/dynamic-dragn-drop-with-jquery-and-php/ it working fine in normal php, when want integrate in zend framework,i getting error saying "unknown not method" @ $(#tag).sortable() . not able find problem is. may zend library not supporting html 5. please help me finding solution. thanks in advance. the problem not in zend, since code have posted javascript (jquery). your problem calling $() function non-string parameter. $(#tag).sortable() should $("#tag").sortable() php jquery html5 zend-framework drag-and-drop

sockets - Sth Wrong with the CFSocket on ios server side, the callback function is not be called -

sockets - Sth Wrong with the CFSocket on ios server side, the callback function is not be called - i build online game on iphone , need code found connection between 2 players, not bonjour , must utilize socket way this. , here's code on client, works when running on mac, not work on iphone device testing. has no clue goes wrong,and bothers me alot . has same problem? log says socket listening on port,but acceptcallback function not called,what's wrong? cfsocketref sserveripv4; cfsocketcontext ctx4 = { 0, null, null, null, null }; sserveripv4 = cfsocketcreate(kcfallocatordefault, pf_inet, sock_stream, ipproto_tcp, kcfsocketacceptcallback, acceptcallback, &ctx4); cfsocketref sserveripv6; cfsocketcontext ctx6 = { 0, null, null, null, null }; sserveripv6 = cfsocketcreate(kcfallocatordefault, pf_inet6, sock_stream, ipproto_tcp, kcfsocketacceptcallback, acceptcallback, &ctx6); if (sserveripv4 == null)

ios - XCode does not build Unity3D Project: lib not found -

ios - XCode does not build Unity3D Project: lib not found - i have unity3d project , built ios. if run using xcode's simulator works fine. if want compile "ios device" or physical device connected mac, lots of errors , result can't create archive. testing purpose, created empty unity3d project, built ios , still same errors, although project absolutely nothing. errors following: ld: library not found -liphone-lib clang: error: linker command failed exit code 1 (use -v see invocation) and these settings use: architectures: armv7, armv7s, arm64 (also tried removing arm64 without positive result) base sdk: ios 7.1 build active: no supported platform: ios valid arch: armv7, armv7s, arm64 i utilize xcode 5.1.1 , unity 4.5.1 (previously tried 4.3.2) how can build project , create archive? i've run same issue time ago , fixed replacing quotes under library search path: replace "$(srcroot)/libraries" with $(srcroot

mysql - php image upload cant copy the actual file to the destination folder -

mysql - php image upload cant copy the actual file to the destination folder - i having problem when trying upload image mysql database has 3 fields: id(auto increment), username , image location. code inserting image location database not copying actual image "profile_pics" directory. please assist. this code: <?php $connection=mysql_connect("localhost", "root", ""); $choose_db=mysql_select_db("ninjacity", $connection) or die (mysql_error()); if ($_session['user'] && $_post['submit']) { function check() // check if pic exists { $username=$_session['user']; $choose_db; $sql_check="select * profile_pics username='$username'"; $res_check=mysql_query($sql_check) or die (mysql_error()); homecoming mysql_num_rows($res_check); } $name=$_files['image']['name']; $tmp_name=$_files['image']['tm

scala - Cross-cutting "logical" scopes in multi-project sbt builds -

scala - Cross-cutting "logical" scopes in multi-project sbt builds - let's have build handful of subprojects related have logical classification above sorts of things build aware of. for example, might have collection of subprojects foo bar baz quux woof oink i know woof , bar part of i'd phone call server component. baz mutual dependency of both, , foo, quux, , oink on client side. whole build aggregate of various subprojects, i'd "focus" on server side, or client side, or whatever. on 1 hand, i've considered nested aggregated projects, i'm not sure how works sbt's other functionality. on other, thinking of making custom scopes cutting across subprojects. i'd able configure related projects similar keys, handy able i'd update key grouping of related projects. what's approach sort of thing? thinking wrong? dealt similar situation. my solution break things out sub-projects in sbt, , utilize dependson

ruby on rails - Circular dependency when trying to reopen an engine class? -

ruby on rails - Circular dependency when trying to reopen an engine class? - i trying re-open class in rails comes engine. did following: module xaaron apikey.class_eval include promiscuous::publisher publish :xaaron_users_id, :api_key, :as => :apikey end end which sits in: models/ xaaron/ api_key.rb this in app, should allow me run: bundle exec promiscuous publish "xaaron::apikey.all" but, when do, error: runtimeerror: circular dependency detected while autoloading constant xaaron::apikey tl;dr: seek renaming api_key.rb else. here i think happening: rails autoloader loads xaaron/api_key.rb , encounters unknown constant xaaron::apikey . tries load file called (based on constant name)... xaaron/api_key.rb . boom, circular dependency. ruby-on-rails ruby class-eval

sql server - How to xQuery an element that is a list of xs:date that can be empty? -

sql server - How to xQuery an element that is a list of xs:date that can be empty? - i have schema xs:date attribute defined in way may contain date or empty. but when trying query element error "xquery [value()]: 'value()' requires singleton (or empty sequence), found operand of type 'xs:date *'" any suggestions? steps reproduce create xml schema collection dbo.[test] n'<xs:schema xmlns:xs="http://www.w3.org/2001/xmlschema"> <xs:element name="package" > <xs:complextype> <xs:choice minoccurs="0" maxoccurs="unbounded"> <xs:element name="customer"> <xs:complextype> <xs:sequence> <xs:element name="birthday" > <xs:annotation> <xs:documentation>date of birth</xs:documentation> </xs:annotation>

memory leaks - WinDbg with dump files when you have a classic ASP app which uses a lot of .Net via interop -

memory leaks - WinDbg with dump files when you have a classic ASP app which uses a lot of .Net via interop - ok, first please don't inquire why application way is. classic asp application in several areas uses .net , com , of .net reaches com! it's code reuse really, @ point .net introduced , used whole load of features, required within classic asp app , voile! kind of hellish beast appeared. so question? can see looks serious memory leak in application (it's 32 bit) private bytes rocket 900mb+ , users start receive out of memory errors , odd issues part of page beingness rendered. took perfmon logs , added user action tracing code , tied info trace perfmon (working set , private bytes on w3wp). told me few things, did find issues with, "resolved" , release - though had no impact. stress test on app based on actions in iis logs, told me nil - can't replicate @ locally. so got memory dump when hits around 900mb , analysing windbg. problem -

ios - Inheritance from an Objective-c base view controller from Swift -

ios - Inheritance from an Objective-c base view controller from Swift - i trying migrate uiviewcontroller objective-c class swift. view controller inheriting baseviewcontroller have mutual functionality want have in controllers. problem having generated myproject-swift.h not able find baseviewcontroller . is there way implement uiviewcontroller in swift inherits baseviewcontroller (subclass of uiviewcontroller ) written in objective-c? there bridging problem? it can reproduced minimal code: baseviewcontroller.h #import <uikit/uikit.h> @interface baseviewcontroller : uiviewcontroller @end baseviewcontroller.m import "baseviewcontroller.h" @implementation baseviewcontroller @end viewcontroller.swift import uikit class viewcontroller : baseviewcontroller { } appdelegate.m #import "appdelegate.h" #import "projectname-swift.h" // replace project name @implementation appdelegate - (bool)application:(uiapplicat

Why isn't this php code allowing me to connect to my database? -

Why isn't this php code allowing me to connect to my database? - i'm using wamp server , on created database , table. names right , user has total access everything. when run code, prints out "unable select database". thanks. <?php if(isset($_post["submit"])){ print_r ($_post["nutrient"]); } session_start(); //establish connection $server = "localhost"; $db_username = "root"; $db_password = ""; $database = "gainlife_cavin"; $table = "cavintable"; //connect php script database $connection = mysqli_connect($server, $db_username, $db_password, $database); //select database utilize @mysql_select_db($database) or die( "unable select database"); //$query = "insert $table values("")" //mysql_query($query) mysql_close(); ?> <body> </form> try following. <?php //establish connection $server = "localhost&

java - Array in Array, what should be tracing of this code? -

java - Array in Array, what should be tracing of this code? - int[] ar=new int[5]; int[] numoccurence = new int[ar.length]; (int = 0; < ar.length; i++){ ++numoccurence[ar[i]]; system.out.println(numoccurence[ar[i]]); } first of there no array in array. -if mean line, int[] numoccurence = new int[ar.length]; then nil passing length of ar[] create new array -if mean line, ++numoccurence[ar[i]]; or numoccurence[ar[i]] . 1 time again incrementing values in numoccurence[] , providing index of values based on values in arr[] , ( arr[i] returns int ) an array of array this:- integer[] array1 = new integer[]; integer[] array2 = new integer[]; integer[][] arrays = { array1, array2}; here arrays holds references arrays, integer reference arrays. and said in comments code nil print 1,2,3,4,5. and asked how code works, since not assigning values in array ar or numoccurence , values in them initialized 0. , hence in each iteration of loop