Posts

Showing posts from January, 2011

html - Getting a jquery lightbox to pull the image out of a <img> tag -

on website using jquery plugin scrolls images automatically across page, fine. but if click image takes image source , want use lightbox feature incorporated it. problem jquery lightbox codes can find uses href tag image url, scroller uses img so; img src="img/img1.jpg" longdesc="img/img1.jpg" width="400" alt="image 1" / how can around this? first thing going need disable onclick behavior of image flow: http://finnrudolph.de/imageflow/documentation luckily available in image flow options. something onclick : $.noop next need make alterations lightbox. colorbox uses href attribute determine content display. not standard should able away href attribute on image element. give shot. <img src="img/img1.jpg" href="img/img1.jpg" width="400" alt="image 1" />

php - Magento: Barcode on Printed Invoice using Zend Barcode and Zend PDF -

i trying barcode rendered zend barcode on magento invoice generated zend pdf my standalone test barcode script looks , generate pdf document barcode , text 'testing' intended. $pdf = new zend_pdf(); $page = new zend_pdf_page(zend_pdf_page::size_a4); $page->setfont(zend_pdf_font::fontwithname(zend_pdf_font::font_helvetica), 20); //$font = zend_pdf_font::fontwithname(zend_pdf_font::font_times_roman); zend_barcode::setbarcodefont('gothic.ttf'); $filename= 'barcode.pdf'; $barcodeno = '99700161bst004008501022006714'; $barcodeoptions = array( 'text' => $barcodeno, 'barheight'=> 74, 'factor'=>3.98, //'fontsize' =>20, //'drawtext'=> false ); $rendereroptions = array(); $renderer = zend_barcode::factory( 'code128', 'pdf', $barcodeoptions, $rendereroptions )->setresource($pdf, $page)->draw(); $page->drawtext('test', 25, 720, 'ut

Powershell MYSQL query syntax with Variable -

the sqlwriterow function sends query , retrieves data specific row i'm looking for. have problem when send querys containing powershell variables. instead of writing '$id' if type in 26 (or whatever id im looking for) i'll expected data back. if put in variable i'll no data back. , playing around formats such taking out quotes i'll get you have error in sql syntax; check manual corresponds mariadb server version right syntax use near '' @ line 1 i've tried sorts of ways formatt such $sqlcmd4appcheck = "use spree; select * tasks_profiles id = '$id'" $sqlcmd4appcheck = "use spree; select * tasks_profiles id = ``$id``" $sqlcmd4appcheck = "use spree; select * tasks_profiles id = ''$id''" $sqlcmd4appcheck = "use spree; select * tasks_profiles id = "$id"" code: function sqlwriterow($args1, $args2) { [void][system.reflection.assembly]::loadfrom(“c:\program f

c++ - Limitations on pointers to various types within a class family? -

suppose have 4 classes: a,b,c, , d. a base class. b derived a. c derived a. d derived b. i have vectors of each type of object. i create 5th class excluded related classes (family?), called z. z contains variable points object of class a, called purple. can create "inter-family" universal pointer doing like: * puniversal; and point puniversal a,b,c, or d interchangeably object stored in vector of type.. set purple variable of z puniversal? yes, can that. it's 1 of main benefits of having derived classes. if have functions in a should implemented b or c , make sure they're virtual.

python - how to delete an image using django? -

i want know how add delete button in form deleting image. the project simple "pics viewer", index shows images stored want add "x" icon deleting specific image. here code. views.py from django.shortcuts import render, redirect gallery.forms import imageform gallery.models import image def index(request, image_form=none): image_form = image_form or imageform(request.post, request.files) if request.method == 'post': if image_form.is_valid(): new_image = image(image=request.files['image_file']) new_image.save() # obtenemos el listado de imagenes registradas images_list = image.objects.all().order_by('-id') return render(request, 'index.html', { 'image_form' : image_form, 'images_list' : images_list, }) models.py from django.db import models django.contrib import admin class image(models.model): image = models.filefield(upload_

cmd - Windows equivalent of "echo -n" no longer works in Win7 -

i had nifty trick in windows cmd.exe (at least xp) emulate behaviour of unix echo without newline, echo -n . example, command: <nul: set /p junk= xyzzy would result in 6 characters being output, leading space , string "xyzzy", , nothing else. if you're interested in why works, it's input command outputs " xyzzy" prompt waits user input before assigning input junk environment variable. in particular case, doesn't wait user input since grabs input nul device. it rather useful in cmd scripts when (for example) processing files in loop (one iteration per file) want list more 1 per line. using trick, output each file name followed space , no newline then, after loop, output newline finish up: processing files: file1.txt file42.txt p0rn.zip now discover that, under windows 7, spaces no longer output is: processing files: file1.txtfile42.txtp0rn.zip is there way can set /p start honouring spaces again, or there way in win7

php - Silverstripe - google connect -

i trying make google connect/openid work in silverstripe getting error , don't understand error @ all. [notice] trying property of non-object /googlecallback/googleconnect $ch = curl_init($url); curl_setopt_array($ch, array( curlopt_returntransfer => true, curlopt_httpheader => array( 'accept: application/xrds+xml') )); $xml = curl_exec($ch); $xml = simplexml_load_string($xml); $discovery = $xml->xrd->service->uri->__tostring(); curl_close($ch); $params = array( 'openid.mode' => 'checkid_setup', 'openid.ns' => 'http://specs.openid.net/auth/2.0', ps: using module https://github.com/mediadevils/silverstripe-google-authentication it tell line triggered error guess in $discovery = $xml->xrd->service->uri->__tostring(); it quite not getting expected xml response (it can many reasons, module might not root cause of iss

ruby - Nginx Rails Error -

when start nginx, error: preloader /u/apps/dismissrr/current started on pid 23521, listening on unix:/tmp/passenger.1.0.23443/generation-0/backends/preloader.23521 [ 2013-04-05 03:16:30.9237 23447/7fb12e117700 pool2/implementation.cpp:1144 ]: [app 23521 stderr] [ 2013-04-05 03:16:30.9235 23559/0x0000000664d420(worker 1) utils.rb:55 ]: *** exception socketerror in rack application object (getaddrinfo: name or service not known) (process 23559, thread 0x0000000664d420(worker 1)): [ 2013-04-05 03:16:30.9240 23447/7fb12e117700 pool2/implementation.cpp:1144 ]: [app 23521 stderr] /u/apps/dismissrr/shared/bundle/ruby/1.9.1/gems/gelf-1.3.2/lib/gelf/ruby_sender.rb:16:in `send' [ 2013-04-05 03:16:30.9241 23447/7fb12e117700 pool2/implementation.cpp:1144 ]: [app 23521 stderr] /u/apps/dismissrr/shared/bundle/ruby/1.9.1/gems/gelf-1.3.2/lib/gelf/ruby_sender.rb:16:in `block in send_datagrams' [ 2013-04-05 03:16:30.9242 23447/7fb12e117700 pool2/implementation.cpp:1144 ]: [app 23521 st

algorithm - How to construct a DAWG from a trie? -

i construct trie vocabulary, , found there many branches shared same struct. want combine them result dawg . what algorithm use convert trie dawg? the standard algorithm converting trie dawg works treating trie deterministic finite automaton , converting trie minimum-state dfa . there many algorithms performing conversion. algorithm i'm familiar hopcroft's algorithm , works finding pairs of distinguishable states , combining indistinguishable states together. hope helps!

android - Batching Multiple Rectangles in OpenGL ES -

i experiencing slow performance iterating through quad triangle strips , drawing each 1 separately, batch of rectangles 1 single draw call. looking around, seems best way occur overhead of duplicating vertices , using gl_triangles instead of gl_triangle_strip, drawing 2 separate triangles each rectangle. the problem each rectangle can have different color, , need programmatically change color of of rectangles. using 1 gl_triangles call not trick. instead, looks i'll need somehow index color data vertex data, associating color each rectangle. how go this? thank you! you can use vertex coloring. vertices can each have multiple channels of data, including position, color, (multiple) texture, normal, , more. i recommend interleaving vertices include position , color 1 after other, directly. although can set separate array of colors , way (just make sure line colors positions correctly). (those tutorials iphone-oriented opengl es code should work fine on an

Android Live wallpaper..? -

hi friends need create live wallpaper android,my requirement is, need rotate image around different different path. code tried working fine minimum number of frames..as per design no of frames high smoother animation, if use nos of frames not way, apk size more. there way achieve same.

ios - How to get the scene dock in xcode 4.6 to display the view controller name? -

i getting started xcode 4.6 , ios dev in general. i created single view ios app , can see scene dock,but not able see view controller name on scene dock while viewing mainstoryboard in xcode. instead see view controller, first responder , responder icons on it. how view controller name appear. you can see screenshot @ http://i49.tinypic.com/15n64vt.png apparently name displayed when select different view controller in interface builder, in case cannot since working single view controller. therefore suggest use document outline show name of view controller. can open clicking rounded icon on bottom left.

html - CSS3 or Javascript - Simple Fill Animation -

i'm trying create simple animation when user hovers on element, element contained within fills parent. currently, have jsfiddle that. but, want finish few other features i'm not sure can in css3. i'm trying find way to, upon having inner circle fill parent, (ie when width/height = 300px), i'd fill pause , not disappear after animation complete. when user moves mouse outside :hover range, animation reverse direction opposed abruptly stopping. i've gotten far css3 not sure can implement these 2 features without resorting javascript. know of way of doing entirely in css3/does know if possible these last 2 features in css3, because can't seem find anything. .circle { width: 300px; height: 300px; background-color: white; border: 1px solid #000000; overflow: hidden; border-radius: 150px; -moz-border-radius: 150px; -webkit-border-radius: 150px; } .filler { width: 0px; heigh

ios - How to Pass Custom class Object using NSUser Defaults in iphone SDK? -

this question has answer here: how store custom objects in nsuserdefaults 6 answers in app, have custom class file. i try using objectforkey shows me null value & give error in console [nsuserdefaults setobject:forkey:]: attempt insert non-property value '<fsvenue: 0x181898c0>' of class 'fsvenue'. note dictionaries , arrays in property lists must contain property values. how can pass object of custom class view? code custom class follow: fsvenue.h #import <uikit/uikit.h> #import <corelocation/corelocation.h> #import <mapkit/mapkit.h> @interface fslocation : nsobject{ cllocationcoordinate2d _coordinate; } @property (nonatomic, assign) cllocationcoordinate2d coordinate; @property (nonatomic,strong)nsnumber*distance; @property (nonatomic,strong)nsstring*address; @end @interface fsvenue : nsobject<mka

jquery - add a class to parent items only in menu -

i working on menu want add class parent menu items through jquery. code wrote working fine if menu item dont have child elements(drop down menu). changes should make add class parent items on hover. here html <nav id="main-menu" style="display: block;"> <ul id="menu-nav_menu" class="nav sf-js-enabled"> <li class="menu-item cat-item"> <a href="http://localhost/carp/?page_id=45" class="sf-with-ul"> <span class="main_text">about carp</span> </a> <ul class="sub-menu" style="display: none; visibility: hidden;"> <li id="menu-item-41" class="menu-item"> <a href="http://localhost/carp/?page_id=40">vision</a> </li> </ul> </li> <li class="menu-item"> <a href="http://localhost/ca

Extjs4 grid's paging functionality is not working -

i working in extjs4. adding paging functionality grid. having grid view code as- allquestionpapers.js ext.define('balaee.view.qb.qbqns. ', { extend : 'ext.grid.panel', alias : 'widget.paperlist', id : 'paperid', store : 'qb.qbqnsstore', border : false, // height:autoheight, width : 600, autoscroll : true, columns : [{ text : 'date', width : 200, dataindex : 'createdate' }, { text : 'questionpaperno', width : 200, dataindex : 'questionpaperno' }, { text : 'marks', width : 200, dataindex : 'obtainmarks' }],

iphone - How To Detect If User Has iOS App Installed In Browser - Like Example Site In Post -

Image
i wondering how site detected have ios app installed when visited web site on phone. http://drafthouse.com/austin sites can implement safari smart app banners. see apple's documentation details: promoting apps smart app banners it done via this: <meta name="apple-itunes-app" content="app-id=myappstoreid, affiliate-data=myaffiliatedata, app-argument=myurl">

java - The primitive type int of FC_COLS does not have a field inBlockSize -

i getting error on laststartcol = fc_cols – inblocksize; , similar error laststartcol = economy_cols – inblocksize; . not sure teacher wants me statement.simple answers appreciated. //determine laststartcol, last legal start column given block //size in row. if(inrow < fc_rows) laststartcol = fc_cols – inblocksize; else laststartcol = economy_cols – inblocksize; for(int startcol = 0; startcol <= laststartcol; startcol++) { ... whole class: public class airplane { private seat [ ] [ ] seats; public static final int first_class = 1; public static final int economy = 2; private static final int fc_rows = 5; private static final int fc_cols = 4; private static final int economy_rows = 5; private static final int economy_cols = 6; public airplane() { seats = new seat[fc_rows][fc_cols]; (int i=0; i<fc_rows; i++) { (int j=0; j<fc_cols; j++) { seats[i][j] = new seat(seat.window); } seats = new sea

c# - Dashboard controls in Winforms -

Image
i working on winform based applications(yes don't know wpf) , want's dashboard panels in it. picture given below each panel have title , records database , action controls. how achieved? don't want use gridcontrol don't want show excel spreadsheet here. how achieved? it sounds want make usercontrol , possibly coupled automatic layout panel flowlayoutpanel . simply speaking, create usercontrol whatever properties , events require (i.e. in example might have title property , data property), , events need respond (e.g. might have button provide wrapper event for). can add control existing form other standard control. as far displaying data in list form goes, 1 suggestion use panel , dynamically add label s it. idea simple label line breaks in text .

android - Not Clickable Button -

on code below action_widget_clicked doesn't work... knows why? my_widget_update works fine. toast on receive never see intent.getaction() of action_widget_clicked . seems went somewhere wrong , button click doesn't create broadcast... i've distinguish click between istances, every istances of widget has different action on action_widget_clicked . example: on updateappwidget i've pass toast appwidgetid of widget clicked manifest: <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="it.fraschi.controllogiardinowg" android:versioncode="1" android:versionname="1.0" > <uses-sdk android:minsdkversion="8" android:targetsdkversion="17" /> <application android:allowbackup="true" android:icon="@drawable/ic_launcher" androi

objective c - Inserting a comma for integers when there are three digits added everytime to the textfield in iOS -

i need add comma separating numbers 3 digits without white spaces , if total digits under three, no comma added. for example: 2984 => 2,984 297312984 => 297,312,984 298 => 298 how solve this? tried this: if([textfield.text length] > 3) { nsmutablestring *stringtext = [nsmutablestring stringwithstring:textfield.text]; [stringtext insertstring:@"," atindex:0]; } abt after starting, started think if there better solution? because there lot of if-else statements. welcome suggestion. this i've come with: set delegate of text field, , implement following method accordingly: - (bool)textfield:(uitextfield *)textfield shouldchangecharactersinrange:(nsrange)range replacementstring:(nsstring *)string { if (textfield.text.length % 4 == 3) { if (string.length != 0) { textfield.text = [nsstring stringwithformat:@"%@,%@", textfield.text, string]; return no; } } return yes; }

c# - LINQ: Aggregate Rows based on dictionary or mapping? -

i firing q linq query against sp list employees involved, how many items belong them , overall percentage. i pointed error within data: on several rows 3 users not listed "lastname, firstname" domain\username. need inconsistencies in data flattened out. one possibility ignore results name contains "domain\". i'd map 3 usernames real names. domain\user1 => lastname, firstname domain\user2 => lastname, firstname domain\user3 => lastname, firstname and aggregate result "lastname, firstname" row of user my actual code looks this: public ienumerable<employeevm> getallemployees() { entitylist<ticketselement> tickets = _db.getlist<ticketselement>("tickets"); return tickets.where(b => b.bearbeiterid != null && b.bearbeiterimnname != string.empty && b.bearbeiterimnname != null) .groupby(b => b.bearbeiterimnname) .o

windows - WriteConsoleW, wprintf and Unicode -

allocconsole(); consolehandle = getstdhandle(std_output_handle); writeconsolew(consolehandle, l"qweąęėšų\n", 9, null, null); _wfreopen(l"conout$", l"w", stdout); wprintf(l"qweąęėšų\n"); output is: qweąęėšų qwe why wprintf stop after printing qwe? \0 byte encountered in ą should terminate wide-char string, afaik the stdout stream can redirected , therefore operates in 8-bit mode. unicode string pass wprintf() gets converted utf-16 8-bit code page that's selected console. default that's olden 437 oem code page. that's buck stops, code page doesn't support character. you'll need switch 8-bit code page, 1 support character. choice 65001, code page utf-8. fix: setconsoleoutputcp(cp_utf8); or use setconsolecp() if want stdin use utf-8 well.

escaping - java resultset.getstring("col_name") query -

i have simple query regarding resultset.getstring() method in java jdbc. suppose value in database column having \ javas escape character e.g. \n or \t etc. when retrieve value getstring() see 1 more escape character getting added , actual meaning of \n string literal only. had unescape java , use properly. string s= rs.getstring("col_name"); when s contains `\n': system.out.println(s) output: \n after unescaping java using apache common stringescapeutils output: system.out.println("hi"+s+"hello"); hi hello my question adding \ before unescaping?? sorry if dumb question. the jdbc driver no escaping in resultset . bad if does. @ simple example: the database table x contain 1 column value . there 2 rows: 1 2 character string ( '\' , 'n' ) , 1 witch 1 character string (the newline character). i've added string-length output clarification. select *, length(value) x; value | length -------

php - How to extend the ZF2 skeleton application - entities with foreign keys -

my zf2 skeleton application works fine per zend user guide. i'm running in circles trying extend application album's artist isn't string anymore foreign key of artist table in db. i've created necessary models, controllers, views create, edit , view artists, works fine. how combine 2 list of albums shows artist's name? do use hydrator strategy as suggested here ? if so, how implement it? zend\stdlib\hydrator\strategy manual doesn't tell me register hydrator strategy. yes there short implementation code: $foo = new foo(); $foo->setfoo("bar"); $foo->setbar("foo"); $hydrator = new classmethods(); $hydrator->addstrategy("foo", new rot13strategy()); but go? in albumcontroller? , why keeps saying hydrators "mostly used forms"? or isn't hydrator i'm looking after all? thing keep bumping in quest solution dependency injection. again found kind of tutorial , in using classes a, b , c , not telling me

speech recognition - Can CoMIRVA package be used in android? -

i planning extract mfcc features in real time can used speech recognition in android application. same have found there package available in java called comirva. tried using package application getting errors. this part of code creating object of mfcc class. float samplerate=8000; private mfcc mfcc_inst=new mfcc(samplerate); i have not yet started using of methods in class. rest of application contains code real time audio recording , playback using audiorecord , audiotrack classes. when run app getting error @ line create object. posting concerned part of log file below e/androidruntime(871): fatal exception: main e/androidruntime(871): java.lang.verifyerror: comirva/audio/util/math/matrix e/androidruntime(871): @ comirva.audio.util.mfcc.getmelfilterbanks(mfcc.java:267) e/androidruntime(871): @ comirva.audio.util.mfcc.(mfcc.java:162) e/androidruntime(871): @ comirva.audio.util.mfcc.(mfcc.java:71) e/androidruntime(871): @ com.example.mfcc.mfccactivity.(mfc

php - Propagating sessions via url -

in php, according manual : "a visitor accessing web site assigned unique id, so-called session id. either stored in cookie on user side or propagated in url." when , why should prefer passing sessions through url rather cookie? the main difference session token may sent different domain via referrer, mitigated checking origin ip address. beside this, cookies sent in http headers, url ends in request line. there's no real difference regarding security, because https encrypts both. request url may written in log file , (minor obviously) risk. cookies default handler pass session tokens, can fallback param in query string when disabled on client side.

asp.net - Call ApplicationStart Method in Global.asax Without a Request -

i'm publishing asp.net site iis( local machine has iis v8, server's iis v7 ). want start function in global.asax.cs without calling page. *when call page, global.asax.cs application_start method launches. want launch without page call request.* namespace productservice.xmlfeed { public class global : httpapplication { protected void application_beginrequest(object sender, eventargs e) { ftpuploadermain.registercacheentry(); //this method want start without page call } void application_start(object sender, eventargs e) { simplelogger.writelog("application started without page call","d:\\log.txt"); registerroutes(); //ftpuploadermain.registercacheentry(); } private void registerroutes() { routetable.routes.add(new serviceroute("products", new webservicehostfactory(), typeof(productxmlfeedservice)));

checkout - Modify Magento core text -

i change word 'discover' 'diners club' in magento checkout. selections saved credit card payment gateway. in mage payment etc config.xml <di> <code>di</code> <name>discover</name> <order>30</order> </di> change name here clear cache , check. or in app/etc/local.xml add in config node , change discover appropriate value </global> <payment> <cc> <types> <di> <code>di</code> <name>discover</name> <order>30</order> </di> </types> </cc> </payment> </global>

error while testing Windows 8 app made by the help of Construct 2 -

Image
i trying empty project in construct 2 , export windows 8 app project , i'm getting error: don't know mean , don't know do, clue nice :) open "view local services" control panel (cmd+w , type 'local service' shortcut) , start or restart service called "windows firewall".

java - JamVM on Motorola FX9500 Problems - what should I do? -

i using motorola fx9500 rfid reader, runs linux jamvm version 1.5.0 on (i can deploy applications - cannot change java vm or options limited) - here's see when check version: [cliuser@fx9500d96335 ~]$ /usr/bin/jamvm -version java version "1.5.0" jamvm version 1.5.4 copyright (c) 2003-2010 robert lougher <rob@jamvm.org.uk> program free software; can redistribute and/or modify under terms of gnu general public license published free software foundation; either version 2, or (at option) later version. program distributed in hope useful, without warranty; without implied warranty of merchantability or fitness particular purpose. see gnu general public license more details. build information: execution engine: inline-threaded interpreter stack-caching compiled with: gcc 4.2.2 boot library path: /usr/lib/classpath boot class path: /usr/local/jamvm/share/jamvm/classes.zip:/usr/share/classpath/glibj.zip i need write application grabbed oracle java sdk 1.5.0

c++ - Different Between Static Mutext and Not Static Mutex -

i have code in .cpp namespapce { namespace { static cmutex initmutex; } void init() { //code here } void uninit() { //code here } } what different if remove static in mutex , if there static? , use of static? thanks! if mutex static , if have been in header , header included in 2 cpp files(2 translational units), lock applied code in first file not seen second file dangerous. because 2 units has separate static of mutex. in case global mutex preferable. if c++ use raii mechanism manage mutex lock , unlock. c++, class? encapsulate things class. raii example (basic one, things can encapsulated class): http://en.wikipedia.org/wiki/resource_acquisition_is_initialization

Blackberry Twitter App using oAuth and TWITTER API ME 1.8 Library -

i building twitter app bb connects twitter , posts on users behalf. using twitter api me 1.8 library , oauth authentication method. here code: class showauthbrowser extends mainscreen implements oauthdialoglistener { browserfield b = new browserfield(); public showauthbrowser() { _authmanager = new verticalfieldmanager(no_vertical_scroll | no_vertical_scrollbar); _pinmanager = new horizontalfieldmanager(no_vertical_scroll | no_vertical_scrollbar); authbutton = new buttonfield("ok"); authpin = new textfield(field.editable); _labelstatus = new labelfield("your app being authorized..."); _authmanager.add(_labelstatus); _authmanager.add(b); _pinmanager.add(authbutton); _pinmanager.add(authpin); pagewrapper = new browserfieldoauthdialogwrapper(b, consumer_key, consumer_secret, callback_url, this); pagewrapper.setoa

css - span causes content inside to be lower? -

i'm adding span wrap part of text can apply specific font it, reason drops below part of under baseline of paragraph contains text. anyone have ideas on how move ( span ) on same line rest of text? i'm trying relative positioning, i'm wondering if there better way. here code: <!doctype html> <html lang="en"> <head> <meta charset="utf-8" /> <style type="text/css"> html, body{ margin:0; padding:0; font-size:16px; } .container{ height:342px; width:100%; padding-top:2em; padding-left:2em; background:#ffffff; background:rgb(255, 255, 255); -moz-box-sizing:border-box; -webkit-box-sizing:border-box; box-sizing:border-box; color:#333333; color:rgb(51, 51, 51); font-family:'trend'; font-size:120%; font-size:1.2rem; *behavior:u

javascript - searching option from keyboard when different character encoding -

i have select tag has options in georgian: <select> <option value="1"> პირველი </option> <option value="2"> მეორე </option> <option value="3"> მესამე </option> </select> when expand select tag , press "მ" on keyboard, want search option begins on "მ". working fine default when characters written in english. have no idea how fix it, can suggest anything? i don't have georgian characters on keyboard, @ least know russian: html: <select id="select"> <option value="0">Ноль</option> <option value="1">Один</option> <option value="2">Два</option> <option value="3">Три</option> <option value="4">Четыре</option> <option value="5">Пять</option> <option value="6">Шесть</op

linux - Auditing specific syscall parameter value -

i want deploy auditing focused on more sophisticated scenarious on gnu/linux boxes, instance execution of commands touch -m 'faketime' somefile. straced exec , found out difference between normal touch , touch timestamp modifying flag. these respectively: utimes("/proc/self/fd/0", null) = 0 utimes("/proc/self/fd/0", {{1364383142, 0}, {1364383160, 875693}}) = 0 so seems easy catch suspicius occurances of utimes syscall; second (a1) argument has null. tried set following audit rule: -a exit,always -f arch=b32 -s utimes -f a1!=0 -k timestamp_tampering however doesn't catch call. text representation of value (null) not accepted auditd in a1-4 arguments, @ least got trouble trying achieve it. suggestions? in advance.

java - Servlets showing different outputs? -

i using simple servlet code: mycon = drivermanager.getconnection(url); mystmt = mycon.createstatement(); resultset rs; string course = req.getparameter("course").trim(); out.println(course);///////here problem string query="select * tbsolvedbanks course_code='"+course+"' ;"; rs=mystmt.executequery(query); out.println("<banks>"); while(rs.next()) { out.println("<bank>"); out.println("<number>"+rs.getstring("number")+"</number>"); out.println("<name>"+rs.getstring("name")+"</name>"); out.println("<title>"+rs.getstring("title")+"</title>"); out.println("<description>"+rs.getstring("description")+"</description&

knockout.js - Issues with knockout observable array validation -

i have issue validation rule put on observablearray elements. i'm using custom message template display errors, issue doesn't displayed on when errors there, however, can see '*' against relevant field. following model: function viewmodel(item) { var parse = json.parse(item.d); var self = this; this.id = ko.observable(parse.id).extend({ required: { params: true, message: "id required" }}); this.name = ko.observable(parse.name); this.weeklydata = ko.observablearray([]); var records = $.map(parse.weeklydata, function (data) { return new data(data) }); this.weeklydata(records); } var data = function (data) { this.val = ko.observable(data).extend({ min: { params: 0, message: "invalid minimum value" }, max: { params: 168, message: "invalid maximum value" } }); here validation configuration i'm using: // enable validation ko.validation.configure({ registerextenders: true, messagesonmodified: false, in

android - Google Cloud Messaging apache tomcat not working -

i making gcm service in app, , following tutorial http://lalit3686.blogspot.in/2012/07/android-steps-to-run-gcm-demo.html but on step 8, getting requested url /gcm-demo not found on server." on supplied url localhost/gcm-demo i searched alot can't figure out whats problem. in advance. default port 8080, have tried use following url: http://localhost:8080/gcm-demo

iphone - How to Transfer Large Files over wifi in iOS -

i downloaded witap code apple's website. transferring data on local wifi network. working in project interact client - server architecture. sending nsdata client side server. i made 2 projects; 1 client , 1 server at client side project, made following changes modified appcontroller.m file adding following method appcontroller.m (client side) - (void)senddata:(nsdata*)pobjdata { assert(self.streamopencount == 2); if ( [self.outputstream hasspaceavailable] ) { nsinteger byteswritten; nsuinteger length = [pobjdata length]; byteswritten = [self.outputstream write:[pobjdata bytes] maxlength:[pobjdata length]]; nslog(@"written bytes -> %d",byteswritten); } } then calling method send data. at server side project, made following chagnes modified appcontroller.m file modifying following method appcontroller.m (server side) - (void)stream:(nsstream *)stream handleevent:(nsstreamevent)eventcode {

jquery - terminating because too few slides -

i receive error saying few slides. may know problem? function log() { if (window.console && window.console.log) window.console.log('[cycle] ' + array.prototype.join.call(arguments,' ')); }; this html code , jquery. i'm running under google chrome , trying use onmouseover effect don't know if did works or not. appreciated. <script type="text/javascript"> $("#menu1").hover( function () { $("#td_1").show(); }, function () { $("#td_1").hide(); } ); $("#menu2").hover( function () { $("#td_2").show(); }, function () { $("#td_2").hide(); } ); $("#menu3").hover( function () { $("#td_3").show(); }, function () { $("#td_3").hide(); } ); $("#menu4").hover( function () { $("#td_4").show(); }, function () { $("#td_4").hide(); } ); $("#menu5").hover( function