Posts

Showing posts from February, 2010

html - onclick to forward request to other URL -

i want open page on click of link. below link. <a href='#' onclick=window.open('\\122.96.212.765\spread\form\5.0\tx1\na\show\spread_show_ _33_pm\index_vin_test_zasf91a.htm','_self') >click here</a>. but when click above link 404 error displayed on page url changing below: http://localhost:8080/122.96.212.765spreadform%05.spread_show_ _33_pmindex_vin_test_zasf91a.htm please suggest, need add ay code onclick work. can try changing \'s /'s

Make haar feature scale -

this code import java.awt.image.bufferedimage; public class haarfeature { public static void getfeature(bufferedimage image){ int width = image.getwidth(); int height = image.getheight(); //int feature_width=1*scale_width; //int feature_height=1*scale_height; int[][] ii = integralimage.convintegralimage(image); int white=0; int black=0; int feature=0; for(int i=0;i<height;i++){ for(int j=0;j<width;j++){ if(i<(height-1) && j<(width-3)){ if(i==0 && j==0){ black=ii[i][j+3]; white=ii[i+1][j+3]-ii[i][j+3]; feature=black-white; system.out.print(feature+" "); } else if(i==0){ black=ii[i][j+3]-ii[i][j-1]; white=ii[i+1][j+3]+ii[i][j-1]-ii[i][j+3]-

jquery - How to extract substring between specific characters in javascript -

how extract "51.50431" , "-0.1133" latlng(51.50431, -0.1133) using jquery. tried using substring() not helpful numbers in latlng(51.50431, -0.1133) keep on changes in different ranges. time can come latlng(51.50, -0.1). help? regular expressions rescue: 'latlng(51.50, -0.1)'.match(/latlng\(([^,]+),\s*([^)]+)\)/) // ["latlng(51.50, -0.1)", "51.50", "-0.1"]

algorithm - segment tree with lazy propagation in large range -

can please tell me how lazy propagation works in segment tree if want update values in range? also, how problem using segment tree , lazy propagation? suppose there 15 boys in row, standing facing east, , after 3 moves range [3,6] facing north, , after 2 moves facing west. how update range if our row size around 10 6 ? clockwise direction [east-->south-->west-->north-->east] for example: suppose there n students standing facing east, , have move students 3 6 2 moves in clockwise direction. thus, after move, students "e e w w w w e e e e". then, want find max number of students in range standing facing same direction. in example, if find answer in range [1,6], there 2 students facing east , 4 facing west, answer 4. http://wcipeg.com/wiki/segment_tree#lazy_propagation to problem: suppose have n people. create segment tree addition n leafs value 0 initially. if want turn people indices j clockwise, update [i..j] range +1, if counterclockwise --

Circular Type References in TypeScript -

i new typescript , trying understand how can setup circular reference between 2 types. reference need not full code reference, interfaces, interfaces defined in separate files. example, let's have 2 interfaces: parent , child. doubly-linked such parent has collection of children , each child has reference parent (as seen below). how setup imports or dependencies these can defined in separate files? interface parent { children: child[] } interface child { parent: parent } two solutions below. prefer latter since offers clean interfacing node js modules, unfortunately ide doesn't (yet) as do... use references create definitions.d.ts file contain references classes/interfaces /// <reference path="parent.ts" /> /// <reference path="child.ts" /> in parent.ts , child.ts , point single reference, definitions.d.ts file /// <reference path="definitions.d.ts" /> use import...require pass --module com

ios - NSMutableArray in Custom cell implementation issue -

Image
so had code on specialoffercell.h #import <uikit/uikit.h> #import "afimagepager.h" @interface specialoffercell : uitableviewcell<afimagepagerdatasource,afimagepagerdelegate> @property (nonatomic, retain) nsmutablearray *arrayimages; @property (nonatomic) nsinteger offer_id; -(void)loadimages; @property (weak, nonatomic) iboutlet afimagepager *imageicons; @property (weak, nonatomic) iboutlet uilabel *titlelabel; @property (weak, nonatomic) iboutlet uilabel *desclabel; @end and implementation file #import "specialoffercell.h" @implementation specialoffercell @synthesize arrayimages; - (id)initwithstyle:(uitableviewcellstyle)style reuseidentifier:(nsstring *)reuseidentifier { self = [super initwithstyle:style reuseidentifier:reuseidentifier]; if (self) { } return self; } - (void)awakefromnib { // initialization code self.imageicons.delegate=self; self.imageicons.datasource=self; } -(nsarray*)getarrayimages{ return [nsarray arraywithar

python - Elementtree and counter - finding corresponding value -

this question exact duplicate of: loop inside loop - python 1 answer i have element tree python code counter. need specific name (product name, supplier name , supplier id) . below code me product id highest quantity sold. need product name, supplier name , supplier id corresponding product id orders = root.findall("./orders") total ={} order in orders: orderdetails = order.findall("./orderdetails") detail in orderdetails: productid = detail.findall("./products/productid")[0].text quantity = detail.findall("./quantity") if productid in total.keys(): total[productid]+=float(quantity[0].text) else: print productid,float(quantity[0].text) print total total[productid ]=float(quantity[0].text) print counter(total).most_common(1)[0][0]

c++builder - Indy's SNMP Trap send nothing -

i tried send snmp trap using indy's component tidsnmp. (code copied implementing snmp sendtrap using indy components ) void __fastcall tmainform::btsendtrapclick(tobject *sender) { string myenterprise = _d("1.5.5.5.5.5.5.5"); string eventtype = myenterprise + _d(".1"); string eventdistance = myenterprise + _d(".2"); tidsnmp * idsnmp = 0; idsnmp = new tidsnmp(null); idsnmp->trap->host = edhost->text; idsnmp->trap->community = _d("public"); idsnmp->trap->enterprise = myenterprise; idsnmp->trap->gentrap = 6; // i've met such values idsnmp->trap->spectrap = 1; // somewhere in inet idsnmp->trap->mibadd(eventtype,_d("ftcritical")); idsnmp->trap->mibadd(eventdistance,_d("2.357")); idsnmp->sendtrap(); delete idsnmp; } but wireshark doesn't registar network activity. tried variant quicksendtrap same resu

java - Android not reading XML file from another webhosting -

i have simple problem problem have xml file mytext.xml on link http://alsauditech.com/finalfetch/mytext.xml fine when read file web server but when try read mytext.xml file server http://www.islamicessentials.org/audio/mytext.xml (www.ixwebhosting.com/ ) my application crashes tried gave permission 777 , filed suppport ticket , tried chat busy my logcat 06-27 14:00:59.689: i/process(23648): sending signal. pid: 23648 sig: 9 06-27 14:01:04.741: i/webkit/webview(23718): webview() constructor=android.webkit.webview@40531360 06-27 14:01:04.822: i/webkit/webview(23718): webview.loadurl() this=android.webkit.webview@40531360url: data:text/html;utf-8,<html><body><h1>live broadcast</h1><br><object data='http://23.226.131.127/player.php' width='330' height='50' type='text/html'></object><br><object data='http://23.226.131.127/stats_bb_ios_g.php' width='330' height='100' t

c# - how to return a class method's values to the respective pages that called it -

so i've got 2 pages in application. have mysql class containing connection parameters , query carried out. thing is, need both pages use same method in class , return data form triggered it. this way works enough 1 page, don't know how use 2 or more of them. //mysql library using mysql.data.mysqlclient; using mysql.data; namespace masca.users.mysql { public class registrationsql { // sql class knows registration page public users.registrationpages.registrationform registration; // sql class knows registration form , datagrid page public users.registrationpages.registrationformgrid registrationformgrid; this method wish globally accessible. // guess part cant figure out // set it's supposed ruturn strings right? // don't how add page return strings if calls method. public void foward (users.registrationpages.registrationform registrationform) { //declarations string datasource = "

Chrome API - Making active tab go back in history more than once -

i'm trying chrome extension make active tab go in history more once. why code make active tab go once, instead of 5 times, it's supposed to?: gobackonepage(0); function gobackonepage(count) { // active tab in current window. chrome.tabs.query({ 'active': true, 'lastfocusedwindow': true }, function(tabs) { var activetabid = tabs[0].id; // execute history.back() script on active tab. chrome.tabs.executescript(activetabid, { code: 'history.back();' }, function(result) { // recurse 5 times. if ( count++ < 5 ) { console.log(activetabid); // gets logged 5 times (recursion working) gobackonepage( count ); } }); }); } the active tab goes 1 page, no more. log gets called 5 times , logs exact same active tab id 5 times. why doesn't active tab go 5 times? tried wrapping recursive call in settimeout method (500ms) , created thread-pausing method (essentially), same

ajax - DFP Ads on an AngularJS app -

we building angularjs web app , trying integrate dfp ads. way, have php web app dfp ads running familiar how dfp integration works, of course different on angularjs app, due front end loading nature. so, know there 3 components need working: in <head> : the dfp tag either sync or async, shown here, https://support.google.com/dfp_sb/answer/1651549 . know google recommends async, on our php app had switch sync, since async doesn't support rich media, , facing reporting discrepancies async. so, angularjs app, can still use sync, or async? the dfp tag in define ad slots, , call enableservices, singlerequest or syncrendering, etc. way, want have dynamically populated ad slots per page (app state), have figure out. , , in <body> : the tags displaying ads ad divs. on angularjs app work .display() or need call .refresh() method? any appreciated, in advance. cheers, iraklis try ngdfp ngdfp simple library angular js allows add doubleclick publ

highcharts - Is Gill sans supported for export? -

Image
i have chart data label font set 'gill sans'. when export chart png font changes. gill sans not supported export? ie8 used. at moment cannot add font, please request idea on our uservoice website highcharts.uservoice.com.

html - how to style image button at navigation bar like when hover, link, the image will change the pattern -

i want made when hover, active , visited, image change image, method? now put image under background, cause when put image, word come down, want made word overlap image, can't... if can please explain why need style this... learn use html want understand more it, thanks <div class="navbar" style="margin-left:80px;padding-top:40px;"><!--navbar--> <div id="navbar" > <div id="navhome" style="width:100px;height:60px; padding-top:30px; padding-left:10px"> <a href="index.html">home</a> </div> </div> <div id="navbar"> <div id="navhistory" style="width:130px;height:60px; padding-top:30px; padding-left:10px;"> <a href="about.html">about us</a> </div> </div> <div id="navbar"> <div id="navevent" style="width:130px;height:60px; padding-top:30px; pa

spring tool suite - When will STS support Tomcat 8? -

i've downloaded sts 3.5.1.release, doesn't appear let me run application on tomcat 8. tomcat 8 out of beta (with version 8.0.9), se when should expect sts support tomcat 8? thanks /martin the tomcat support part of underlying eclipse distribution included in sts. upcoming version sts 3.6.0 based on eclipse luna release, has support tomcat 8. if don't want wait, feel free give 3.6.0.m1 try.

c# - Uploading a file through ASP MVC asyncronously? -

is possible upload file asynchronously website using asp mvc 4? in current solution, when user uploads file, post-back checks number of bytes in file stream - if it's greater 8024 bytes, put error in tempdata , return same page indicating file large. if under 8024, create new task funnel bytes filestream new destination file, somewhere on server. however, boss correctly pointed out @ point may late warn user file large. we wondering whether possible check length of file on server side before reading bytes user (and without user having wait file upload before finding out file large - imagine trying upload 8125kb file on 3mbit connection find out file gave 1 byte large, sorry, try again. the reason asked if upload file asynchronously because seems asynchronous streaming me - give response, regardless of actual progress of upload. we're aware can use iis (through httphandler attribute in configuration) prevent requests on x bytes, want handle error handling ourselve

Django python syntax error in views.py -

i had issue web application in django : syntaxerror @ / invalid syntax (views.py, line 98) request method: request url: http://craft.irisa.fr/ django version: 1.6.5 exception type: syntaxerror exception value: invalid syntax (views.py, line 98) exception location: /usr/lib/python3.2/importlib/_bootstrap.py in get_code, line 413 python executable: /root/craft/trunk/sources/env/bin/python python version: 3.2.3 a part of code of views.py file : def login_view(request): """ logs user application """ # redirect if user connected if request.user.is_authenticated(): return httpresponseredirect('/') if request.method == 'post': # values sent form login_form = authenticationform(data=request.post) # log user in if form valid if login_form.is_valid(): login(request, login_form.get_user()) #line 98 here : messages.add_message(request, messages.info, u'welcome '+ request.user.username +

node.js - How to intergate web application like Google Calendar? -

i'm developing web application looks google calendar backed end nodejs server. @ need make possible allow users integrate created calendars sites (like google calendar do). basically don't understand how make possible. i'm looking tutorials and/or examples (in node js especially) start point. please give me advice or share experience. thanks. since question can't closed because there bounty on it, i'll add answer it: what looking called "embeddable widget". the idea provide end user (developer/webmaster) piece of javascript will: if needed pull in more javascript server. append bunch of html contains widget place droppeded in. speak server through either ajax or other ways. here couple of resources read: http://codeutopia.net/blog/2012/05/26/best-practices-for-building-embeddable-widgets/ http://prettyprint.me/prettyprint.me/2009/05/30/widgets-iframe-vs-inline/ http://iframely.com/docs/iframelyjs - iframe widget lib (never

qt - QTcpSocket doesn't read everything -

i trying use cryptopp qtcpsocket, encrypt username on client side, send through tcpsocket, , decrypt server side. here problem, qtcpsocket doesn't read message, can see server side expecting receive several packets 1 cipher, read method says whole message read in char*, don't see really.... here code sending cipher : char size[5]; sprintf(size,"%d{",crypted_mess.size()); int written = 0; written = socket->write(size); written = socket->write(crypted_mess.c_str(),crypted_mess.size()+ 1); socket->waitforbyteswritten(crypted_mess.size()); string recovered = t.discryptor(crypted_mess) ; and code decrypt (works fine client side without sending message) : if(paquet_missing_size == 0) { current_message->clear(); was_read = socket->read(start_message,1000); int message_start = 0; while(start_message[message_start]!= '{') message_start++; char *size_total_string; size_total_stri

html - how do i change the css property for only one row with a custom class with out removing the styles from the other rows? -

http://codepen.io/louisverdiguel/pen/vcjfh this first time here hope doing right. html i have created string of rows , columns html client "resemble" spreadsheet. css i have created css class class="sale td" within class . .sale td {border: 1px solid grey; } to have border show each row issue: remove border <tr> contains <h2> tag how go creating such specific class or action css , method called? you can try this: link css: .sale tr.no_border td { border: 0px !important; } html: <tr class="no_border"> <td colspan="3" align="left" valign="top"><h2>bottles</h2></td> </tr>

javascript - jQuery not triggering -

this question has answer here: event binding on dynamically created elements? 18 answers sorry not having informative title. try explain want , current problem here. making page shows contents in different categories. there category selector , page bar toggling contents, have create jsfiddle prototype easy ref. html: <div class="row">type <select id="type" style="margin-left:57px; width:153px;"> <option value="all">all</option> <option value="type1">type1</option> <option value="type2">type2</option> <option value="type3">type3</option> </select> </div> <div class="data_cat"> <div class="data-type1" id="0&q

c++ - how to dissolve a sprite into pixels using cocos2d-x? -

i have logo image , want dissolve small square pixels images down top of logo image fade in action , logo remove game start. how can in cocos2d-x v3 using c++ coding or other way?thanks in advance. there's nothing in code have permission ask question made that. ccaction *fadein = [ccfadeto actionwithduration:0.5 opacity:0.5]; ccaction *fadeout = [ccfadeto actionwithduration:0.5 opacity:1.0]; ccsequence *pulsesequence = [ccsequence actions:[fadein copy],[fadeout copy], nil]; i think method here have logo dissolve pixels, brute force, mean rebuilding logo 1 pixel @ time adding single pixels sprites onto layer, instead of logo.png have ton of whitepixel.png redpixel.png etc, send them action. depending on how fast dissolves, work (although rebuilding logo pixel art take long time, i'd recommend doing pixel matrix , write function place sprites). alternatively, can fake covering/obscuring/fading sprite top bottom , spitting particles out along wipe line. if w

CMake: different operations with different build type -

i want add specific flags when compile in debug mode (gcc/linux). when call cmake want print these flags. if compile in release mode don't set these don't want print flags. basically want print message if build in debug mode. in cmakefile.txt i've following code: # setting compiler if (cmake_compiler_is_gnucxx) set (user_debug_flags "-w -wall -wextra -winit-self -werror") message(status "setting flags linux compiler") if (cmake_build_type matches debug) list(append cmake_cxx_flags_debug ${user_debug_flags}) message(status "debug compiler flags: ${cmake_cxx_flags_debug") endif(cmake_build_type matches debug) endif(cmake_compiler_is_gnucxx) if call cmake with cmake /path/to/cmakefile.txt/ -dcmake_build_type=debug i see first message (so linux compiler recognized) cannot see second message. how can check if cmake_build_type set debug or release?

bash - awk compare two files -erase row from second file from condtion of first file -

i need help. first file 0.5 0.4 0.1 0.6 0.9 second file .bam (i have use samtools view) aaaa bbbb cccc aaab bbaa ccaa hoho jojo toto sese rere baba jouj douj trou and need output: aaaa bbbb cccc aaab bbaa ccaa sese rere baba condition: if $1 first file in <0.3;0.6> print same row second file, if not, erase it. want filtrate second file condition of first file. prefer awk or bash code, not important. condition first file: awk '{if($1>0.3 && $1<0.6) {print $0}}' please me? lot here 1 awk solution: awk 'fnr==nr {a[nr]=$1;next} a[fnr]>0.3 && a[fnr]<0.6' firstfile secondfile aaaa bbbb cccc aaab bbaa ccaa sese rere baba not printed since <0.6 , not <=0.6

regex - sed remove trailing space after bracket -

i trying remove trailing space after brackets in html file using sed (part of shell script on centos): from this: <p>some text ( <em>text should not break new line</em>). more text.</p> to this: <p>some text (<em>text should not break new line</em>). more text.</p> i can in sublime text \(\s regex , replacing bracket not work in sed. i have tried: sed 's/[(]\s*$/(/' sed 's/[(]\s*$\n/(/' and many other things, none of them work. any ideas? try: sed ':a;/($/{n;s/\n//;ba}' file if line ends ( , appends next line ( n ) pattern space , substitutes newline character \n nothing, thereby joining lines. done in loop ( ba jumps label a ).

yaml - How to log the active configuration in a Spring Boot application? -

i use yaml config spring boot, find quite readable , useful have single file showing properties active in different profiles. unfortunately, i'm finding setting properties in application.yml can rather fragile. things using tab instead of spaces cause properties not exist (without warnings far can see), , find active profiles not being set, due unknown issue yaml. so wondering whether there hooks enable me hold of active profiles , properties, log them. similarly, there way cause start-up fail if application.yml contains errors? either or means me validate yaml myself, kill start-up process. i had same problem, , wish there debug flag tell profile processing system spit out useful logging. 1 possible way of doing register event listener application context, , print out profiles environment. haven't tried doing way myself, mileage may vary. think maybe what's outlined here: how add hook application context initialization event? then you'd in list

wrong result from left shift in java -

i have made variable in java, byte = 0xa6; //10100110 made : system.out.println(integer.tohexstring( ((short)a<<8)&0xffff )); the result 0xa600. right result. when tried system.out.println(integer.tohexstring( ((short)a<<3)&0xffff )); the expected result should : 0x530 (10100110000) got 0xfd30(1111110100110000) emm... can explain how got wrong result...?? thanks... :-) the byte value a6 represents negative number (bytes signed in java). when cast short gets sign extended ffa6 . shift operation executed integer values again sign extended ffffffa6 . shift left 3 bits gives fffffd30 , taking lower 16 bits gives 0000fd30 . this not matter if shift 8 bits because shift out , mask additional 1 bits.

c# - Convert new object creation to linq expression for linq to entities -

i doing query using linq entities , want reuse same code different select statement. query: return f in getfields<t>() f.id == id select new prop<v> { name = f.name, value = tovalue(f.value) }; where tovalue func creates new value object. want use several tovalue function have kind of body: var tovalue = f => new derivedvalueclass { firstfield = f.firstfield, secondfield = f.secondfield } so simple assignment, translated sql entities. when execute code, linq entities states: the linq expression node type 'invoke' not supported in linq entities i guess not possible call tovalue function, since can't translated. how can create expression function tovalue in order use inside linq query? eventually find out linqkit allows kind of things easily: expression<func<t, v>> tovalue = => new derivedobject() { // perform assign

fabricjs - Fabric.js - Grouped iText not editable -

the title says all. when fabric.itext is part of fabric.group , no longer reacts editable text. here use-case: http://jsfiddle.net/vajyd/ is there way solve problem? otherwise have write on group. btw: fabric.group has many advantages, disabled eventing makes impossible use ui-elements (i.e. use-case or groups of buttons groups of texts , rects). currently there no way itext handle events not handed down if it's contained in group. think prefered way handle confuse user - if starts edit multiple texts. might end in mess. maybe can rework script little workaround problems.

android - Can't find .apk file in the Facebook SDK folder -

i can't find .apk file in facebook sdk folder. have download rar folder here: link edit: 2. install facebook sdk android , facebook apk download , extract sdk zip file. resulting folder, facebook-android-sdk-3.5, contains sdk itself. note location of folder. installable apk of facebook app in bin folder of sdk, , named fbandroid-3.5.apk or similar secondly, locate adb tool in platform-tools directory of main android sdk. on os x, have chosen location when unzipped android sdk. on windows, sdk installed home directory, under appdata\local\android\android-sdk assuming you’ve placed facebook sdk in home directory, use adb install apk running emulator in os x this: ./adb install ~/facebook-android-sdk-3.5/bin/fbandroid-3.5.apk , on windows, this: adb install %homepath%\facebook-android-sdk-3.5\bin\fbandroid-3.5.apk should see facebook app in emulator’s app list or home screen. help me how should put fb in emulator? looks me newest facebook apk sdk 3.15 no longer loca

node.js - pipe tcp client data to http response ,get: 'res not defined' -

how pipe tcp client data http response ? cannot find complete example that. var ohttp = require("http") ohttp.createserver(function(req, res) { var query = req.url.split('?')[1]; otcp.write(query +'\n') ; }).listen(port); get data tcp client http 'res' object using pipe : var onet = require('net'); otcp = new onet.socket(); otcp.connect(port, host, function() { console.log('tcp.client listen @ port ' + port ) this.pipe(res); }); got error node.js 'this.pipe(res);' not defined on object 'res' what want achieve : declare http serever connect once tcp client. from http serever (req,res) cycle write tcp client query string get response tcp client pipe , bypass on('data',...) event handlings pipe 'know target stream 'res' streamer, if understand. in examples see, develoeprs putting tcp.connect inside scope of http.createserver loop cycle ??

dns - IIS 7 IP address forwarding -

Image
i want move websites server 1 server 2. my clients have records pointing ip address of server 1. without updating dns records, how can automatically forward request domains server 1 server 2? thanks graham this image an article regarding exchange , iis settings relevant. you can redirect @ http level specifying url redirect in iis's http redirect settings:- however, approach work need new domain sites. e.g. if record resolves www.example.com server 1 need redirect url (e.g. www.example.edu ) resolves server 2 . another option setup reverse proxy using iis on server 1 : today there question in iis.net forums asking how expose 2 different internet sites site making them if subdirectories in main site. so example goal have site: www.site.com expose www.site.com/company1 , www.site.com/company2 , have content www.company1.com served first 1 , www.company2.com served in second one so different requirements (the article wants subdirector

PHP Facebook SDK login unreliable -

i'm having strange behavior on script. using facebook php sdk create button link getloginurl() : $loginurl = $facebook->getloginurl(array( 'canvas' => 1, 'fbconnect' => 0, 'scope' => 'email', 'redirect_uri' => 'http://www.myurl.com') ); most of time works , can access user information using following bit of code if(!isset($_session['front']['user_id']) || !is_numeric($_session['front']['user_id'])) { if (isset($_request['code'])) { try { $user_id = $facebook->getuser(); $basic = $facebook->api('/me?access_token=' . $access_token); if (is_array($basic) && is_numeric($user_id)) { $user = get_user_id_facebook($basic); $_session['front']['user_id'] = $user; $_session['front']['user_name'] = $basic['

kiosk mode or fullscreen in chromium on android -

i have built chromium contentshell android device explained here: https://code.google.com/p/chromium/wiki/androidbuildinstructions i want use contentshell in fullscreen mode. tried add flag kiosk explained here: http://www.chromium.org/developers/how-tos/run-chromium-with-flags but not working. there way use kiosk mode on android chromium or recommend way achieve want have? (display of website in fullscreen without address bar/menu , no system ui bars) to rid of system ui bars did this: service call activity 42 s16 com.android.systemui as explained here: https://stackoverflow.com/a/19373504/3640770 then edited shell_view.xml , added linearlayout responsible toolbar: android:visibility="gone" as explained here: https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev/6ssgxfpohqg

c# - Search rasphone pbk file -

in application i'm using rasphone function connect vpn's when application launches gets vpn connections in combobox using code. string f = environment.getfolderpath(environment.specialfolder.applicationdata) + @"\microsoft\network\connections\pbk\rasphone.pbk"; if (system.io.file.exists(f)) { list<string> lines = new list<string>(); using (streamreader r = new streamreader(f)) { string line; while ((line = r.readline()) != null) { lines.add(line); } } foreach (string s in lines) { if (s.startswith("[")) { char[] mychar = { ']' }; string newstring = s.trimend(mychar); char[] mychar2 = { '[' }; string newstring2 = newstring.trimstart(mychar2);

sql - add_filter function not working as expected -

i'm trying edit wp_query in wordpress using add_filter function . when var_dump query request outputs sql expected. however, when runs returns error different query! know why query might change, , change much! query request var_dump (as expected): select sql_calc_found_rows wp_posts.*, ( 3959 * acos( cos( radians(52.486243) ) * cos( radians( lat ) ) * cos( radians( lng ) - radians(-1.890401) ) + sin( radians(52.486243) ) * sin( radians( lat ) ) ) ) distance , lat latitude , lng longitude wp_posts inner join wp_term_relationships on (wp_posts.id = wp_term_relationships.object_id) inner join wp_postmeta on (wp_posts.id = wp_postmeta.post_id) inner join wp_postmeta mt1 on (wp_posts.id = mt1.post_id) inner join lat_lng_post on wp_posts.id = lat_lng_post.post_id 1=1 , ( wp_term_relationships.term_taxonomy_id in (2) ) , wp_posts.post_type = 'event' , ((wp_posts.post_status = 'pub

android - Executing Sample of Amazon Fire-Phone SDK -

i trying run sample of fire-phone sdk in eclipse , android studio in xml file gives error. error "no resource identifier found 'headertitle','actionmenu','headersubtitle', etc. in amazon " , follow step described in given link https://developer.amazon.com/public/solutions/devices/fire-phone/docs/implementing-headernavigationbar in amazon developer site..... you cannot use eclipse accessing amazon xml resources. this in website "note: applications need compile amazon xml resources not supported in eclipse, , require use of gradle plugin." move android studio :) https://developer.amazon.com/public/solutions/devices/fire-phone/docs/setup

ubuntu - service tomcat7 start fails, but the process exists and tomcat is running -

i have been trying install tomcat7 on ubuntu docker images apt-get install tomcat7 . installation works fine , starting tomcat catalina.sh works well. i need start tomcat "service tomcat7 start", instead fails. regardless failure result, if wget localhost:8080 can see tomcat answering , if ps -ef | grep tomcat can see process. similarly if run service tomcat7 status says tomcat not running when , pid file exist. i have noticed when start tomcat catalina scripts, pid file created called tomcat.pid , /etc/init.d/tomcat script try read tomcat7.pid . however, forcing name in script peek right pid file, not solve problem. has else experienced this? the ubuntu version of docker file trying not relevant, since have been trying several. anyway 1 using 12.10 , 14.04 . thanks! in docker ubuntu image using (5506de2b643b - 14.04.1 lts), start-stop-daemon --test argument working incorrectly , reports tomcat not running, when is. the tomcat7 init.d

django error loading of image with non ascii character -

i getting following error when trying visit website image name contains non ascii character: ioerror @ /obiekty/ [errno 2] no such file or directory: u'/home/darnok/fitspace/media/obiekty/orlik_sp_4_zamo\u015b\u0107.png' funny thing on localhost when using django development server worked fine. tried both development server on vps gunicorn, same in both cases. dont know if related use app image-kit handling images resizes. tried clear cache browser, nothing changes. issue related settings: media_root = os.path.join(base_dir, "media") media_url = '/media/' static_url = '/static/' staticfiles_dirs = (os.path.join(base_dir, "static"),) model field: zdjecie = models.imagefield('zdjęcie', upload_to='obiekty') zdjecie_thumb = imagespecfield(source='zdjecie', processors=[resizetofill(133, 100)], format='jpeg', options={'quality': 100}) template line causing issue: <a href="{{x.get_abs

java - Missing dependencies while trying to upload file with jersey -

Image
i trying develop application upload file jersey errors on dependencies. have checked other posts did not find solution. below error: severe: following errors , warnings have been detected resource and/or provider classes: severe: missing dependency method public javax.ws.rs.core.response upload.server.uploadfile(java.io.inputstream,com.sun.jersey.core.header.formdatacontentdisposition) @ parameter @ index 0 severe: missing dependency method public javax.ws.rs.core.response upload.server.uploadfile(java.io.inputstream,com.sun.jersey.core.header.formdatacontentdisposition) @ parameter @ index 1 severe: method, public javax.ws.rs.core.response upload.server.uploadfile(java.io.inputstream,com.sun.jersey.core.header.formdatacontentdisposition), annotated post of resource, class upload.server, not recognized valid resource method. jun 27, 2014 12:37:16 pm org.apache.catalina.core.applicationcontext log here code: package upload; import java.io.file; import java.io.fileoutp