Posts

Showing posts from April, 2012

javascript - JQuery append() adding quotes and newlines and I don't know why -

i have append statement adds single character @ time span. (the characters pulled string treating array: text[i] , such.) feel should giving me this: <span id="outputid0">text</span> but instead it's giving me this: <span id="outputid0"> "t" "e" "x" "t" </span> i guess makes sense, , not real problem @ moment, bit awkward-looking , i'm not sure why it's happening. can explain 1 me? edit: here's link jsfiddle , showing example of talking about. thank ᾠῗᵲᄐᶌ, seems have diagnosed , solved problem fine without that. if else see it, there is. append adds child node after last child node each character going text node , why separated if want add character @ time you're better off taking whats there , concatenating char string that's there you can using jquery's .text(function(){}) function // = index , v = current text value $('#outputid0

python - "No such file" error when running an autoscript -

i working on project suppose open during start of raspberry pi. can open several other scripts on start up, script trying open during start not open. note : code works when run through idle, not work when test through lx terminal. when test script under auto run script gives me error. another note : image files in same folder script. here code: from tkinter import * pil import image, imagetk random import randint import rpi.gpio gpio root = tk() root.overrideredirect(true) root.geometry("1920x1080+0+0") image=image.open('bikebackground.png') background_image = imagetk.photoimage(image) background_label = label(root, image=background_image) background_label.place(x=0, y=0, relwidth=1, relheight=1) speed = 4 class biker(label): def __init__(self, master, filename): im = image.open(filename) seq = [] try: while 1: seq.append(im.copy()) im.seek(len(seq)) # skip next frame except eoferror: pass # we

Declare an array in Fortran with the name of a parameter in another module -

i'm pretty new in fortran world. piece of code, find difficulty in understanding it. let's in module a, var declared parameter of integer type: integer, parameter :: var = 81 then in module b, array name var declared: integer :: var(2) when these modules used in third module c: use use b won't there conflict in names? or 2 members of array var take value 81? there compile time error when attempt access variable var in described case. specific error like: error: name 'var' @ (1) ambiguous reference 'var' module 'a' are variables meant globally scoped? can declare 1 (or both) of them private scoped module , not pollute global scope. in case though, module c not able use private variable. option limit imported in use statement with: use a, only: some_variable1, some_other_variable use b, only: var this let var b scope of c, , hide var a. if have have both variables in module c, can rename 1 when use modu

java - creating array of objects -

i try create array object stock, wrote code create stock object s , add array. private stock s = new stock("name", "price", 22); stock[] d =new stock[2]; d[0]= s; d[1]= s; i these errors : ']' expected d[0]= s; illegal start of type d[0]= s; if you're outside method, you'll need initializer block (or use constructor) - private stock s = new stock("name", "price", 22); private stock[] d = new stock[2]; { d[0] = s; d[1] = s; } if you're inside method, can - stock s = new stock("name", "price", 22); stock[] d = new stock[2]; d[0] = s; d[1] = s; // stock[] d = new stock[] { s, s }; // <-- or

Mathematical and special characters on mysql -

i need mysql database accept characters following: ≈ ≅ ≆ ≠ ⊂ ⊃ ⊄ ⊅ ⊆ ⊇ ⊈ ⊉ ⋅ ∥ ∣ √ ∛ ∜ ∞ ∓ ± ∑ ∌ ∋ ∈ ∉ ∅ ∃ ∄ ∀ ∁ ∩ ∪ ⁰ ¹ ² ³ ⁴ ⁵ ⁶ ⁷ ⁸ ⁹ ⁿ ⁺ ⁻ ⁼ ⁽ ⁾ ₀ ₁ ₂ ₃ ₄ ₅ ₆ ₇ ₈ ₉ ₊ ₋ ₌ ₍ ₎ → ← ↔ ↚ ↛ ⇆ ⇋ ⇌ Γ Δ Θ Λ Π Φ Ω α β γ δ ε η θ λ μ ℳ π ρ σ τ φ Ϙ ϙ Ϝ ϝ Ϻ ϻ ϼ Τ does know how achieve it? [edit]: tried using utf-8: alter schema `acessoed_portal_student` default character set utf8 collate utf8_general_ci; alter table `question` default character set utf8 collate utf8_general_ci; alter table `question` change `description` `description` text character set utf8 collate utf8_general_ci; alter table `question_response` default character set utf8 collate utf8_general_ci; alter table `question_response` change `description_response` `description_response` text character set utf8 collate utf8_general_ci; what html encoding? can write symbol corresponding escape sequence example ∞ infinite symbol.

Oracle external tables -

i'm struggling oracle external table, although researched oracle forums. still, no success. let's suppose have simple table describe products name null type ------------------------------ -------- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- id not null number name varchar2(30)

android - FB.Event.subscribe does not work when click fb like or unclick -

i fb or unlike event in android . fb.event.subscribe method not fire . strange because javascript code work on https://developers.facebook.com/tools/javascript-console/ not application. know question ask other people . still problem. try many condition , not work. how can solve it. here webview code.. <div id="fb-root"></div> <script> window.fbasyncinit = function() { fb.init({ appid : '578995225546624', status : true, xfbml : true }); fb.event.subscribe('edge.create', function(response) { var likeflag = "1"; alert('you liked url: ' + response); android.showtoast(likeflag); } ); fb.event.subscribe('edge.remove', function(response) { var likeflag = "0"; alert('you unliked url: ' + response); android.showtoast(likeflag); } ); }; (function(d, s, id) { var js, fjs = d.getelementsbytagname(s)[0]; if (d.getelementbyid(id)) re

c# - wpf combobx function operating on a delay -

private void messagetypemenu_selectionchanged(object sender, selectionchangedeventargs e) { string option = messagetypemenu.text; if (option.equals("errors")) { logparser.information = false; logparser.messages = false; logparser.errors = true; } if (option.equals("information")) { logparser.information = true; logparser.messages = false; logparser.errors = false; } if (option.equals("messages")) { logparser.information = false; logparser.messages = true; logparser.errors = false; } } is function supposed update static class depending on selected value. however, operating on delay , im not sure why. for context, information, messages, , errors 3 different message type logs stored in file parsing. when selected information , hits view or save, should lo

c# - How do I Limit asp:Repeater in asp.NET? -

i'm beginner asp.net , now, want limit item in asp:repeater (it's rss feed) this code : <asp:repeater id="rssrepeater" runat="server"> <itemtemplate> <table style="border: solid 1px black; width: 500px; font-family: arial"> <tr> <td style="font-weight: bold"> <asp:hyperlink id="hyperlink1" runat="server" navigateurl='<%#eval("link")%>' text='<%#eval("title")%>'></asp:hyperlink> </td> </tr> <tr> <td> <hr /> </td> </tr> <tr> <td style="background-color: #c2d69b"> <asp:label id="label1&qu

c# - Advice On A Service to Process Live JSON feed -

i have live stream of json data pushed application. in past, have written windows service batch process data, based on timer , passing in datetime value feed reference point next batch of data need. unfortunately, won't able take approach. required pull in json feed near real-time. my question is: best approach? if processing data pushed json feed in real-time, if application go offline reason...i potentially miss data json feed. i've been doing research on subject , not sure if looking @ correct implementation , great! need heartbeat monitor of kind? this general problem real time analyses. the solutions bigdata instance - replication , logging of stream processed, in order replay it, if node fails. guess overkill you. i think best solution might using intermediate storage. instance redis has notifications , publish/subscribe mechanisms. way need make sure redis service running. , increase up-time, replicate on multiple servers. this solution has ot

c# - More efficient way to return errors in .NET Web Api 2 iHttpActionResult object? -

i want return http error code along json object in service. cannot find straightforward way this. right way i'm doing it: if (!modelstate.isvalid) { return responsemessage(request.createresponse(httpstatuscode.badrequest, new badrequesterror(modelstate))); } basically create httpresponse, object want return, , "convert it" ihttpactionresult instance. is right? or should doing way? if sure badrequest correct error message, can use badrequest(string error) method, seen here . send json, first parse string , pass parameter. this done controller class, , available superclasses of apicontroller type. also, please note there methods other error types in apicontroller class.

SQL: Numbering rows based on logical test -

i have vba script numbers rows incrementally in csv file based on date & time rows (the file sorted date time) , want convert sql script can number rows directly in database instead, have no idea start though. the vba script starts @ beginning , if date , time columns same assigns of rows same id number, when date or time changes increments number , on: private sub eventid() dim event integer event = 0 = 2 112543 if (sheet1.cells.item(i, 2) = sheet1.cells.item(i - 1, 2)) , (sheet1.cells.item(i, 3) = sheet1.cells.item(i - 1, 3)) sheet1.cells.item(i, 1) = event else event = event + 1 sheet1.cells.item(i, 1) = event end if next end sub how can in sql server 2012? have 1 table , eventid column empty (null) waiting filled in. the best way load data table has eventid declared identity column. automatically increment values new data put in. if not possible, can update such following: with toupdate ( select t.*, row_number() on (order date, time) seq

Javascript/Jquery validating decimal input on keyup -

i'm trying find way validate text input on key press, want allow numbers inside text input including decimals. taking approach of using jquery.keydown, , checking key , using. input numbers max length 999.999 - my result after . (point) 3 number goog. 99999.999 i need 999.999,222.222,22.01 -> max length +++.+++ this code <input type="text" id="spinedit2" class="aspinedit" /> <script type="text/javascript"> var txt = document.getelementbyid('spinedit2'); txt.addeventlistener('keyup', myfunc); function myfunc(e) { var val = this.value; var re1 = /^([0-9]+[\.]?[0-9]?[0-9]?[0-9]?|[0-9])/g; val = re1.exec(val); //console.log(val); if (val) { this.value = val[0]; } else { this.value = ""; } } </script> thanks how about /^([0-9]{1,3}(?:\.[0-9]{0,3})?)

shell - How to create a bash script that every 5 minutes insert a record in a log file? -

this question has answer here: how can set cron run commands every 1 , half hours? 9 answers i new bash scripting , need create simple script every 5 minutes insert date , time log file , save it. what can do it? can start? the date command output current date , time. can append output of command file >> . finally, sleep pause script specified amount of seconds. #!/bin/bash while true; date >> /path/to/the/logfile/dates.log sleep 300 done the date command provides options modify format of output, if optionless output not suit needs. alternatively, issue crontab -e and add line */5 * * * * date >> /path/to/the/logfile/dates.log of course, can use name logfile, dates.log placeholder used.

google chrome extension - Why isn't my background script getting executed? -

i added simple background script chrome extension. my manifest.json file: { "name" : "test extension", "version" : "1.0", "description" : "test extension.", "background" : { "scripts": ["background.js"] }, "devtools_page": "devtools.html", "permissions": ["http://*/*", "https://*/*"], "manifest_version": 2 } i go chrome://extensions , select background.js in inspect views . it opens devtools go sources , add break point background.js : function foo() { return 5; } foo(); //break point here then reload extension in chrome://extensions . nothing happens. breakpoint not triggered. background script running @ all? simple answer... struggled while too... once click background.html (or background.js ), open in separate debugger window. @ point, reload hitting f5 or ctrl-f5 key(s) debugg

Error "The specified module could not be found" in Sql Server Diagram -

i had made ​​my diagram. but today when double click displays error: the specified module not found. (ms visual database tools) ------------------------------ program location: @ system.runtime.interopservices.marshal.throwexceptionforhrinternal(int32 errorcode, intptr errorinfo) @ microsoft.sqlserver.management.ui.vsintegration.editors.virtualproject.microsoft.sqlserver.management.ui.vsintegration.editors.isqlvirtualproject.createdesigner(urn origurn, documenttype editortype, documentoptions aeoptions, imanagedconnection con) @ microsoft.sqlserver.management.ui.vsintegration.editors.isqlvirtualproject.createdesigner(urn origurn, documenttype editortype, documentoptions aeoptions, imanagedconnection con) @ microsoft.sqlserver.management.ui.vsintegration.editors.scriptfactory.createdesigner(documenttype editortype, documentoptions aeoptions, urn parenturn, imanagedconnection mc) @ microsoft.sqlserver.management.ui.vsintegration.editors.vsdocumentmenuitem.create

c# - OdbcException was caught while firing the SQL query -

'admin_table_name' string array containing names of table taken input text file , 'table_index' index of array.so,while firing query below,"admin_table_name[table_index]" avoided throwing 'odbcexception caught' exception.what mistake making in code? please help. cmd.commandtext = "show keys " + admin_table_name[table_index] + " key_name = 'primary'"; dr = cmd.executereader(); why use odbc? databases native drivers available. can post the complete string of commandtext before executing reader?

PHP custom regroup array -

i want regroup array have problem on columns , grouping child arrays : my array : [0] => array ( [0] => 1393/03 [1] => 5666562 [2] => 5 ) [1] => array ( [0] => 1393/03 [1] => 491380 [2] => 6 ) [2] => array ( [0] => 1393/03 [1] => 4210423 [2] => 30 ) [3] => array ( [0] => 1393/03 [1] => 351000 [2] => 55 ) [4] => array ( [0] => 1393/03 [1] => 53000 [2] => 60 ) [5] => array ( [0] => 1393/02 [1] => 15799573 [2] => 5 ) [6] => array ( [0] => 1393/02 [1] => 1144313 [2] => 6 ) [7] => array ( [0] => 1393/02 [1] => 12131004 [2] => 30 ) [8] => array ( [0] => 1393/02 [1] => 39000 [2] => 55 ) result: (must :)

c# - SignalR client method fires multiple times -

i'm playing around signalr, trying create heatmap overlay on google map. however, method firing multiple times , can't figure out why. the data returned sql formatted json, can plot onto overlay using plugin - http://www.patrick-wied.at/static/heatmapjs/ i've been following web api demo found @ http://techbrij.com/database-change-notifications-asp-net-signalr-sqldependency without luck. code below: view (snipped show relevant code) <script type="text/javascript"> var map; var heatmap; var testdata; $(function () { // proxy created on fly var sales = $.connection.productsaleshub; // declare function on product sales hub server can invoke sales.client.displaysales = function () { getsalesdata(); }; // start connection $.connection.hub.start(); getsalesdata(); }); function getsalesdata() { $.ajax({ url: '../api/values

java - Unresolved compilation but library already in classpath -

Image
i'm facing weird problem trying build component: https://github.com/theclue/talend-components-collection/tree/master/twitter/ttwitterstreaminput this custom component talend open studio, actually, problem seems more general , it's not related talend. the unresolved compilation problems related 2 classes located in twitter4j-stream-4.0.1.jar the library correctly imported , linked, may see command use execute it: c:/program files (x86)/java/jre7/bin/java.exe -xms256m -xmx1024m -verbose -dfile.encoding=utf-8 -cp e:/talendworkspaces/.java/lib/dom4j-1.6.1.jar;e:/talendworkspaces/.java/lib/guava-13.0.jar;e:/talendworkspaces/.java/lib/talend-bridge-api-0.2.jar;e:/talendworkspaces/.java/lib/ttwitterstreaminput-1.1.jar;e:/talendworkspaces/.java/lib/twitter-commodities-0.2.jar;e:/talendworkspaces/.java/lib/twitter4j-core-4.0.1.jar;e:/talendworkspaces/.java/lib/twitter4j-stream-4.0.1.jar;.;e:/talendworkspaces/.java/classes;e:/talendworkspaces/.java/lib; test.twitterstream_0

java - How can i bind an ace:menuItem in ace:menuButton component -

in icefaces 3 application have drop down menu. populate dynamicaly. in managedbean have methode define menuitem. label , actionmethod, , valued them on menuitem. when launch application, item of drop down menu empty. managedbean : package com.omb.view; import java.io.serializable; import javax.el.methodexpression; import org.apache.commons.logging.log; import org.apache.commons.logging.logfactory; import org.springframework.beans.factory.annotation.autowired; import org.springframework.context.annotation.scope; import org.springframework.stereotype.controller; import com.icesoft.faces.component.menubar.menuitem; @controller @scope("session") public class mybean implements serializable { private static final log logger = logfactory.getlog(mybean.class); private menuitem menuitem1; public string initmybean() { try { initmenuitem(); } catch (exception e) { logger.error(e.getmessage(), e); } }

xml - Python ElementTree child node from one tree to another -

i have multiple xml files similar layout. in following example i've done changes xml tree 1, object 1 , copy changes xml tree 2 , 3: example xmls: <example_data> <object class="example" id="xml_tree_1"> <object class="multi_object" id="object_1"> <style many_attributes="stuff_and_changes"/> <object class="object_1" id="random_12"> <style many_attributes="things"/> </object> <object class="object_2" id="random_21"> <style many_attributes="things"/> </object> </object> <object class="object_1" id="object_2"> <style many_attributes="stuff"/> </object> </object> </example_data> <example_data> <object class="example" id="xml_tree_2"> &l

plsql - how to retrive the value of variables outside dynamic pl-sql? -

i perform following query: declare number; begin execute immediate 'select count(1) sometable' returning i; dbms_output.put_line(i); end; and error: returning clause must used insert, update , delete! just small syntax error (no returning): declare number; begin execute immediate 'select count(1) user_tables' i; dbms_output.put_line(i); end;

Clone/Duplicate Records in SQL Server with automatic increment of ids -

i want duplicate rows registry_id = 1 , id's of cloned rows should automatically incremented. when execute insert [zac2].[dbo].[rubrics] ([reference] ,[name_de] ,[name_fr] ,[name_en] ,[name_es] ,[registry_id] ,[registry_type] ,[parent_id] ,[created_at] ,[updated_at] ,[creator_id] ,[updater_id] ,[level] ,[inherited_rating] ,[has_children]) select ([reference] ,[name_de] ,[name_fr] ,[name_en] ,[name_es] ,[registry_id] ,[registry_type] ,[parent_id] ,[created_at] ,[updated_at] ,[creator_id] ,[updater_id] ,[level] ,[inherited_rating] ,[has_children] [zac2].[dbo].[rubrics] registry_id=1 i error message: cannot insert duplicate key row in object 'dbo.rubrics' unique index 'idx_rubrics_reference_registry'. duplicate key value (0, 1, registryplan). with script keys > create > new query editor window get: alter table [dbo].[rubrics] add primary key clustered ([id] asc) (pad_index =

sencha cmd - Why do I get an error when upgrading from ExtJS 4.2.1 to ExtJS 5? -

i executed following specified in extjs 5 upgrade guide: sencha app upgrade -ext and got output error: sencha app upgrade -ext sencha cmd v5.0.0.160 [inf] downloading ext package... [inf] source file : http://cdn.sencha.com/cmd/packages/e....0.970/ext.pkg [inf] downloading : .................... [inf] extracting ext package... [inf] package local: ext/5.0.0.970 [inf] extracting : .................... [inf] loading configuration framework directory: c:\sencha\cmd\repo\extract\ext\5.0.0.970 [inf] removing existing framework @ c:\atlantis\amc\gui\src\main\ext [inf] upgrading application [inf] upgrading sdk @ c:\atlantis\amc\gui\src\main\ext [inf] updating application , workspace ext js 4.2.1.883 / cmd 4.0.2.67 [wrn] use merge tool resolve conflict: c:\atlantis\amc\gui\src\main\usx\.sencha\app\sencha.cfg [err] [err] build failed [err] com.sencha.exceptions.exprocess: failed creating background process [err] [err] total time: 1 second [err] org.mozilla.javascript.wrappedexception:

javascript - jquery animation not working right after the second click -

so trying slide down header when click on wrapper , when click again slides up. it's working when click first time, keeps sliding down again header. here code: var header = $("header"); $("wrapper").on("click", function () { if (header.css({"top" : "-8%"})) { header.animate({"top" : "0%"}, 500); } else if (header.css("top") == '0%') { header.animate({"top" : "-8%"}, 500); }; }); try : $(".wrapper").click( function () { if ( $(".header").css( 'top' ) == '-8%' ) $(".header").animate( {'top' : '0%'}, 500); else $(".header").animate( {'top' : '-8%'}, 500); } ); i've supposed 'wrapper' , 'header' classes that's why i've added $(".header"). if you've tagged them, write $("#head

javascript - Scroll becomes slow when page becomes huge -

i have infinite scroll on website. after while, when page keeps loading things , becomes huge(height > 50000px) scroll becomes extremely laggy , slow. page consists of images , videos(html5 , youtube videos in iframes). the jquery overall remains fast jquery slide events becomes slow. what can make faster? specially scroll. this article handling ngrepeat directive in angularjs tackle "similar" problem. (not same thing @ all) but! , question believe you're doing wrong. should paginate or else. users won't loose content. in "database", right? right? it seems you're looking solution isn't real problem. please reconsider. reevaluate circumstances. study other solutions , approaches. go else.

sql - Concatenate multiple column into single in a resulted query -

i need in adding multiple column in single (db2) after resulted query my resulted query looks like, empi hrs mts sds ------------------- sam 12 10 10 tukai 10 05 02 now, want output instead: empid totaltimetaken ---------------------- sam 12:10:10 tukai 10:05:02 first query: select empid ,totalseconds/3600 hrs ,(mod(totalseconds, 3600) /60) mts ,(mod(totalseconds, 60)) sds (select sum(duration) totalseconds ,empid table group empid) from above query result, want add columns: empid, hrs, mts, sds . i used query not getting result. help... select tmp1.emp ,('0'||(totalseconds.tmp1)/3600)||':'|| ('0'||(mod(totalseconds.tmp1),3600)/60) ':'|| mod(totalseconds.tmp1),60) totaltimetaken ,tmp1.totalseconds (select empid emp, sum(duration) totalseconds table group empid) tmp1 this ibm db2. you should using tmp1 pref

Grails Strange issue with view not rendering -

i have method in controller redirecting method view not rendering. method being redirected have view method's name reason after hitting submit after logging in next view doesn't render. know method associated view being called because other code in method executing, view isn't rendering. if manually navigate view url render fine in browser. ideas? one way around might using jquery read json response , construct redirect url that.

python - wait() on a group of Popen objects -

i have number of popen objects, each representing long-running command have started. in fact, not expect these commands exit. if of them exit, want wait few seconds , restart. there good, pythonic way this? for example: import random subprocess import popen procs = list() in range(10): procs.append(popen(["/bin/sleep", str(random.randrange(5,10))])) a naive approach might be: for p in procs: p.wait() print "a process has exited" # restart code print "all done!" but not alert me first process has exited. try for p in procs: p.poll() if p.returncode not none: print "a process has exited" procs.remove(p) # restart code print "all done!" however, tight loop , consume cpu. suppose add time.sleep(1) in loop it's not busywaiting, lose precision. i feel there should nice way wait on group of pids -- right? the "restart crashed server" task common, , sh

asp.net mvc - Calling a view from the second project -

i have 2 projects in solution (asp.net-mvc). first project main, other project (1 simple controller , views (index, layout). want directly menu in project 1, refer index view of second project. added reference not know do. help? ps: sorry english. project 1 _layout.cshtml <!doctype html> <html> <head> <meta charset="utf-8" /> <title>@viewbag.title</title> <link href="@url.content("~/content/site.css")" rel="stylesheet" type="text/css" /> <script src="@url.content("~/scripts/jquery-1.5.1.min.js")" type="text/javascript"></script> <script src="@url.content("~/scripts/modernizr-1.7.min.js")" type="text/javascript"></script> </head> <body> <div> <nav> <a href="@url.content("~")" id="current">home</a

android - mLocationClient cannot be resolved -

i have problem using google play location services. trying follow http://developer.android.com/training/location/retrieve-current.html more or less. eclipse tells me cannot resolve locationclient. code looks this: @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); overridependingtransition(0,0); mlocationclient = new locationclient(this, this, this); if (savedinstancestate == null) { getsupportfragmentmanager().begintransaction() .add(r.id.container, new placeholderfragment()).commit(); } } @override protected void onstart() { super.onstart(); // connect client. mlocationclient.connect(); } i got feeling, google-play-services library not referenced proper, when got properties of project there green check mark next it. if need more code let me know. in advance! close , reopen project. clean , rebuild project. m

cordova: "unfortunately app stopped"; also memory not released (on disk) -

i'm trying use cordova run application. each time tells me "unfortunately app stopped". plus, memory on disk not released when helloworld2 app fails run: have delete files time time cause cordova tells me there's no more space on disk , on. can give me hint on may happening? i'm using arch way operating system. i issued these commands: cordova create hello2 com.example.hello helloworld2 cordova platoform add android cordova build android cordova emulate android the emulator runs , tells me after while "unfortunately application helloworld2 has stopped". this config.ini emulator: avd.ini.encoding=iso-8859-1 abi.type=armeabi-v7a disk.datapartition.size=200m hw.accelerometer=yes hw.audioinput=yes hw.battery=yes hw.camera.front=emulated hw.cpu.arch=arm hw.cpu.model=cortex-a8 hw.dpad=no hw.device.hash2=md5:d3c9ed02af441ec949711439b9a48b85 hw.device.manufacturer=google hw.device.name=nexus 7 hw.gps=yes hw.keyboard=yes hw.lcd.density=213 hw.ma

sql server - SQL Query with conditional order by for a specific condition -

this question has answer here: sql server conditional order by 5 answers here how data looks like companyname | companycode ----------- ----------- b190 arbot b213 infra a946 michalestest b207 mycompany alerf mycompany lerf snelsy a857 snelsy a954 i want sort list companyname = 'mycompany' first in list associated companycode sorted in asc. and other items listed after 'mycompany' companyname sorted in asc. entries null companyname can @ end of list. i’ve tried far below query didn’t expected result. following link here select [companyname], [companycode] [dbo].cond_orderby_test order case companyname when 'mycompany' companyname else companyname end, companycode i expect final result set below companyname |

c# - PdfContentByte.SetColorFill vs. PdfContentByte.SetRGBColorFill and how to write strikethrough text -

1) what's difference between 2 methods setcolorfill , setrgbcolorfill on pdfcontentbyte class? is latter lets input rgb color values? 2) how write strike-through text? reading documentation, assumed pdfcontentbyte.setrgbcolorstrike meant define color of strike-through text. so, called method. now, want write text strike-through. how do that? you inventing new methods. there no setrgbcolorstrike() method in itext. confusing strike stroke . please download "the abc of pdf itext" . free book writing (only 4 chapters finished far). in chapter 4, you'll learn pdf syntax used construct paths. instance: can construct triangle using 1 moveto() , 3 lineto() methods. constructing path doesn't draw on page. shape drawn if perform fill , stroke or fill , stroke operation (there different ways this). fill fills shape current fill color . shape have no border. stroke strokes shape without filling it. you'll see lines , curves drawn using c

javascript - Getting undefine trying to get the ObjectId of a Collection -

i'm making voting system message board app using backbone. problem here when try objectid of object , set "rel" attribute in tag attribute set "undefined" . <% if(models.length>0) { _.each(models, function(value, key, list) {%> <tr> <td><%= value.attributes.username %></td> <td><%= value.attributes.message %></td> <td> <table> <tr> <td><a id="voteup" class="btn btn-default btn-sm" rel="<%= value.attributes.objectid%> "><img width="30" src="img/appbar.thumbs.up.png"/></a></td> <td width="30"> +<%= value.attr

android - Insert And Select in SQlite database -

i want enter date in edit text field ,that should stored in table clicking save button . after select data should displayed in second page how it.please me. here code database helper.java : public class databasehelper extends sqliteopenhelper { public databasehelper(context context) { super(context, database_name, null, database_version); } // logcat tag private static final string log = "databasehelper"; // database version private static final int database_version = 1; // database name private static final string database_name = "motolifedatabase"; // table names private static final string table_fluidhistory = "fluidhistory"; //fluid history-column names private static final string fluidchange_id = "fluidchageid"; private static final string fcvehicle_id = "vehicalid"; private static final string fcfluid_id = "fluidid"; private static final string last_change = "lastchangedate"; private

php - Catchable Fatal Error: Argument 4 passed to UsernamePasswordToken::__construct() must be an array, null given -

i getting following error when logging in symfony application (with correct username , password): contexterrorexception: catchable fatal error: argument 4 passed symfony\component\security\core\authentication\token\usernamepasswordtoken::__construct() must array, null given, called in d:\xampp\htdocs\essweb\vendor\symfony\symfony\src\symfony\component\security\core\authentication\provider\userauthenticationprovider.php on line 96 , defined in d:\xampp\htdocs\essweb\vendor\symfony\symfony\src\symfony\component\security\core\authentication\token\usernamepasswordtoken.php line 36 security.yml firewalls: admin_area: pattern: ^/ anonymous: ~ form_login: login_path: / check_path: /login_check default_target_path: /user failure_path: / #username_parameter: username #password_parameter: password remember_me: true

java - Can't install Picketlink Forge Plugin JBoss -

i want implement simple form login/register feature in application , unfortunately found tutorials depend on picketlink plugin (if knows tutorials register/login, please tell me!). however, installed plugin: forge install-plugin picketlink and got output: connecting remote repository [https://raw.github.com/forge/plugin-repository/master/repository.yaml]... connected! ***info*** preparing install plugin: picketlink ***info*** checking out plugin source files [/var/folders/0d/s6yx2tks4lgf784zkv1ylnzm0000gn/t/forgetemp4633334032607758018] via 'git' ***info*** switching branch/tag [refs/heads/master] but stops there. doing wrong? any appreciated. maybe should consider forge 2 , forge 1 no more developed actively? after install , run on command line, can install picketlink addon (the new term plugins if forge 2) following command: addon-install --coordinate org.picketlink.tools.forge:picketlink-forge-addon,1.0.0.final cheers, ivan

routing in rails - displaying the contents of one controller in a different view -

i trying figure out how routes contents of 1 controller of another. currently, have 2 controllers - 1. static pages controller - simple, used yield 1 page (with tabbable pages) class staticpagescontroller < applicationcontroller def home end end 2.guides controller - user may (currently) add guides db. class guidescontroller < applicationcontroller def home end def show @guide = guide.find(params[:id]) end def index @guide = guide.all end def new @guide = guide.new end def create @guide = guide.new(guide_params) if @guide.save redirect_to '/guides' else render 'new' end end private def guide_params params.require(:guide).permit(:title, :description, :image, :date, :date_end, :extra_info) end end i want display index part of controller (which works @ '/guides', in root directory, or 'home' in static pages controller. i've tried fiddling of this, , last port of call rou