Posts

Showing posts from January, 2012

php - Image and comment uploading -

@$file = $_files['image']['tmp_name']; @$image = addslashes(file_get_contents($_files['image']['tmp_name'])); $image_name = addslashes($_files['image']['name']); @$image_size = getimagesize($_files['image']['tmp_name']); $user_post = $_post['string'] $user_post mandatory proceeding while, image uploading not compulsory proceed further, have tried various methods $image_size === false takes account empty image file , wrong image file being upload. cant check if image selected empty or image file selected incorrect separately. does have solution issue? if image upload optionally , want check if user has uploaded image or not can use array part $_files['image']['error'] part gives errorcode of file. when part has value 4 no file has been uploade. can check that, when moving file. src: http://php.net/manual/en/features.file-upload.errors.php i hope wanted. if not please clari

intersection of border and route in google maps -

when have specific area of operation (like city or town) travel point in area point b outside of area how can check exact point of intersection of route , border of area on google map? ts -> [ c ] -> b , b start , finish point of route , c exact point route / border - need distance (a;c) , distance (c;b) information c (intersection of route , border) its urgent me, cheers, marcin

Short display images by date newer to older in PHP -

i'm using following function read directory , show images gallery, works well, need display images ordering date newer older. knows how using method? function getpictures() { global $page, $per_page, $has_previous, $has_next; if ( $handle = opendir("saved/2013") ) { $lightbox = rand(); $count = 0; $skip = $page * $per_page; if ( $skip != 0 ) $has_previous = true; while ( $count < $skip && ($file = readdir($handle)) !== false ) { if ( !is_dir($file) && ($type = getpicturetype($file)) != '' ) $count++; } $count = 0; while ( $count < $per_page && ($file = readdir($handle)) !== false ) { if ( !is_dir($file) && ($type = getpicturetype($file)) != '' ) { if ( ! is_dir('saved/2013') ) {

How can I make eclipse look like IDEA for its package listings? -

Image
i've been using intellij idea time, , i've been using eclipse kepler java needs. 1 thing driving me crazy though , i'm hoping there quick fix: how can make eclipse idea package listings? find flat display giant distraction , need looking better. compare in idea: to in eclipse: package explorer / view menu (ctrl-f10) / package presentation... / hierarchical

performance - How to gauge Excel Calculation speed? -

i developing excel 2010 application , contains complex calculations in on 60+ worksheets. when change data in cell, takes lot of time in background calculation (i want calculation automatic )..... is there way find out formula taking more time on other? what better approach improve performance - multiple simple formulas vs. single complex (multistep) formula? i.e. [step-1] e1 = c1 * d1 [step-2] f1 = e1 / b1 [step-3] g1 = f1 + b1 or [single step] g1 = (c1 * d1 / b1) + a1 suggestion appreciated! thanks as second part, if use ordinary non-volatile functions multiple simple formulas better 2 reasons: on simple recalculations (without rebuilding dependency trees) excel calculate parts changed, e.g. in single step example if value in a1 changes excel have recalculate expression in parentheses (c1 * d1 / b1) if values of c1, d1, b1 unchanged. when replace part reference f1, value of f1 not recalculated if a1 changes value. multiple simple formulas bet

ruby on rails - make a custom url for create action with RESTful routing -

in rails 4 i'm trying make custom root particular action in users controller, want restful resources users still are, change url create action , make example /account/register . i'm trying follow seem not work : resources :users, except: [:create] # first eliminate creation of create root resources :users, path: "account/register", as: :users, only: [:create] # try make custom route create action i want still using users_path , not change of routing helper in view, please idea ? try: match '/account/register' => 'user#create', via: :post

google maps - how setting a location by latitude longitude in gmap3 -

good afternoon, using plugin gmap3 ( http://gmap3.net ), , not able set location center map , display marker. explanation: save value of latitude , longitude in database. example "-29.165708760531277, -51.51253212137226". , screen, want open showing location. i'm trying this: var localizacao = $("#localizacao").text(); $("#mapeditar").gmap3({ marker:{ latlng: [localizacao], draggable:true }, }, map:{ options:{ zoom: 16, maptypeid:google.maps.maptypeid.hybrid, } } }); where variable "localizacao", value longitude latitude. but using way, not showing map. there better way this? doing wrong? thank you well start looks have curly brace in code var localizacao = $("#localizacao").text(); $("#mapeditar").gmap3({ marker:{ latlng: [lo

JQuery + Ajax send username with dots? -

i'm trying send username dots through ajax can't find way successfully, code: $.ajax({ type: "post", url: 'access.php', data: {username: $('#'+username.replace(".", "\\.")).show()).val(), password: $('#password').val()}, success: function(data){ // use data } }); in html form username input "mike.smith" hope can me this, in advance! :) try this: $.ajax({ type: 'post', url: 'access.php', data: { username: $('#username').val(), password: $('#password').val()}, success: function(data) { // ... } } at least that's i'm guessing you're trying do

datetime - format time using as.POSIX in R -

i want put time month-date-year hour-min time series data called test. want specify starting time 2014-01-01 00:00:00 . code returns error , tried several times still cannot fix it. > t<-c("2014-01-01 00:00:00") > solar_inp<-xts(test, seq(from=as.posixct(test,origin=t), length.out=8760,by=as.difftime(1,units='hours'))) the error says " 'from' must of length 1". thank much! "01-01-2014 00:00:00" not in 1 of standard formats, (at least) need add ..., format="%m-%d-%y %h:%m:%s" as.posixct call. untested since did not include "test" object. @senor o has point. better set t="2014-01-01 00:00:00" ... things "just work". if index in test object flawed need fix it, too.

Xcode tries to push git submodule -

Image
i've added a git submodule project, whenever try push git using xcode wants push submodule project well. since have read-only access artemis repo, can't push. can around downloading zip of artemis project , including that, lose git submodule update functionality.

sql - How do I look up row values in another table's column? -

i have table , table b table student math science 1 65 38 2 72 99 3 83 85 4 95 91 5 49 20 6 60 80 table b course score_low score_high mark math 0 50 d math 51 80 c math 81 90 b math 91 100 science 0 50 d science 51 80 c science 81 90 b science 91 100 what want see joining table table b student math science math mark science mark 1 65 38 c d 2 72 99 c 3 83 85 b b 4 95 91 5 49 20 d d 6 60 80 c c part of problem tablea denormalized , have separate col

linux - Auto-Running a C Program on Raspberry PI -

how can make c code auto-run on raspberry pi? have seen tutorial achieve not know still missing. initialization script shown follows: #! /bin/sh # /etc/init.d/my_settings # # run can written here ### begin init info # provides: my_settings # required-start: $remote_fs $syslog # required-stop: $remote_fs $syslog # default-start: 2 3 4 5 # default-stop: 0 1 6 # x-interactive: true # short-description: script start c program @ boot time # description: enable service provided my_settings ### end init info # carry out different functions when asked system case "$1" in start) echo "starting rpi data collector program" # run application want start sudo /home/pi/documents/c_projects/cfor_rpi/charlie & ;; stop) echo "killing rpi data collector program" # kills application want stop sudo killall charlie ;; *) echo "usage: /etc/init.d/my_settings {start | stop}" exit 1 ;; esac exit 0 the problem program not run @ boot

git - Adding your .vim ~/.vimrc to github (aka dot files) -

i have seen few people have git repos dot files. i'm wondering if cd ~/ git init git add .vimrc // etc ? , that's how keep date? or make copies , sync them? what strategy guys recommend or use? don't wanna commit , push entire ~/ thanks making git repository of home bad idea (you spending more time creating .gitignore file on doing want do). i suggest using separate git directory dotfiles (eg. ~/git/dotfiles ) , them making symlinks home (eg. ln -s ~/git/dotfiles/.vim ~/.vim , etc.). if can't bothered creating symlinks manually each time want install dotfiles somewhere, can use script following one: https://github.com/sitaktif/dotfiles/blob/master/bin/create-symlinks (it uses https://github.com/sitaktif/dotfiles/blob/master/config.example configuration).

javascript - Changing the order of HTML elements in an array, replacing them in the DOM with the new order -

i have ul called .products , inside of bunch of li 's called .product . each li has data-id on them product's id in database. i'm building functionality when user clicks "move up" or "move down", product moved or down 1 slot in list. $('.move-up').click(function(event) { event.preventdefault(); var shownfieldsarray = $.makearray($('.products')); var currentindex = $(shownfieldsarray).index($(event.currenttarget).parent()); shownfieldsarray.move(currentindex, (currentindex - 1)); // need reordered shownfieldsarray }); move function (link answer function) on array prototype takes old value , new value , moves things accordingly. so question is: how should replace value of $('.products') new, re-ordered list user can visual confirmation? should remove items , re-append them or there better replacement of .val() ? since 2 elements want swap adjacent siblings there no need of above. it's e

python - How to construct a jpeg from a list of grayscale weights -

i'm new @ this, apologies term misuse. i coding in python. have 2d list contains grayscale values every pixel in image. have modified these values needed , save them new image. how can construct new jpeg array of grayscale values? i them saved in manner not overwrite original image files, if possible. i using pil; opened original file image.open('filename') , extracted grayscale values @ each pixel location im.getpixel((i,j)) inside 2 loops. something should going (not tested): old_image = image.open("old.jpg") old_data = old_image.load() new_image = image.new("rgb", old_image.size) new_data = new_image.load() width, height = old_image.size x in range(width): y in range(height): new_data[x, y] = old_data[x, y] new_image.save("new.jpg")

android - Gathering Crash logs off Samsung Galaxy Devices -

i have been testing applications on samsung galaxy s3 , samsung galaxy s. when app crashes, can't seem gather crash logs. have tried many of apps in android market suppose gather logs, none of them seem work. when go email myself logs, file contains nothing. i'm wondering if samsung thing, , if recommendation has. thanks most of galaxy series on android 4.1 , higher, in case the app can log data app logged it , not third-party app. hence, right way crash logs have baked app (e.g., via acra ) or rely on crash data supplied play store.

php - protecting video hotlink by one time url path. (vk.com in example) -

how can protect videos hotlinking? for example: http://vk.com/video215336036_165406371 when @ source code, vk.com provides one-time usage video path such http://cs523402v4.vk.me/u215336036/videos/d436dc950c.240.mp4 you have directory inaccessible outside world have video files. have database table structure like: videos --------------- id uri temp_url timeout where uri location of real video file , temp_url random url generate. timeout field contains timestamp describing when temp_url expires , have generate new one. set timeout 5 minutes when generate new temp_url or 10 minutes. you.

wpf - Xaml - combo box - why does selectedValue NOT work with multiple columns? -

hi , help. the following xaml works fine: <combobox name="cbocit_type" issynchronizedwithcurrentitem="true" mvvm:view.flowswithprevious="true" itemssource="{binding path=cucodeinfo.cittypes}" selectedvaluepath="code" displaymemberpath="code" text="{binding cit_type}" iseditable="true" isreadonly="false" selectedvalue="{binding path=cit_type}"> </combobox> cucodeinfo.cittypes list of items available. there number of public properties, 2 in question "code" , "description". right now, show available code values , user selects one. if 1 selected, shows when page displayed. good. so thought might nice show both code , description. figured shouldn't hard... so removed displaymemberpath statement , added in itemtemplate. when did looked great until tried select item list. when did so, instead of showing selecte

Creating a list box in PowerShell -

Image
i'm trying write powershell script include list box. make sure i've got head wrapped around concepts needed, i've looked tutorial on technet , tried duplicate code provided. http://technet.microsoft.com/en-us/library/ff730949.aspx if i'm following walkthrough , script properly, appears script intended present dialog box , output selected item cli. i've duplicated dialog box, can't write selection cli. modified last line explicitly call write-output show value of $x. everything script appears work intended, except writing out value $x. since echo "$x" perhaps simplest line in code, can presume problem getting data written $x instead. below cut-and-paste powershell ise window, in turn cut-and-paste aforementioned technet article: [void] [system.reflection.assembly]::loadwithpartialname("system.windows.forms") [void] [system.reflection.assembly]::loadwithpartialname("system.drawing") $objform = new-object system.windo

extjs4.1 - Extjs 4.1 - How to work with UX Component Column -

i see tutorial @ http://skirtlesden.com/ux/component-column and make demo project like demo |-index.html |-component.js |-ctemplate.js here index.html ext.loader.setconfig({enabled: true}); ext.require([ 'component' ]); ext.onready(function() { // create grid var grid = ext.create('ext.grid.panel', { title:'straw hats crew', width:500, height:180, striperows: true, renderto: ext.getbody(), store: ext.create('ext.data.arraystore', { fields: [ {name: 'name'} ], data: [ ['monkey d luffy'], ['roronoa zoro'], ['sanji'], ['usopp'], ['nami'] ] }), columns: [ { header: 'name', width: 100, dataindex: &#

how to add/remove three level keywords using mysql and php? -

i want build 3 level keywords system every entry. suggested i've created 1 table (ctypes) categories' information , 1 (categories) relation table entry. create table ctypes ( cat_id int unsigned not null auto_increment, cat_name varchar(20) not null, cat_level int unsigned not null, parent_id int unsigned, primary key (cat_id), unique (cat_name) ); create table categories ( entry_id int unsigned not null, cat_ids varchar(100) not null, unique (entry_id) ); then i've build form collect keywords information checkboxs. <form action="add_category.php" method="post"> <table> <tr> <td><b>level 1(a,b,c)</b></td> <td><b>level 2(aa,ab,ac)</b></td> <td><b>level 3(aa1,aa2,aa3)</b></td> </tr> <tr> <td>a</td> <td>aa</td> <td><input type="checkbox" name="cat[]" value="5"

javascript - change URL url friendly -

this question has answer here: encode url in javascript? 12 answers hi have url (top) i'm trying use "pinterest" change url (bottom). know how can change (top) url same "pinterest" url. there jquery plugin? or somthing (decodeuricomponent)??? maybe there nothing other using .replace. thought ask first. thanks http://my.site.com/folder/shadez/zoom.php?returntype=2&size=small&images[]=base.jpg&images[]=frame_clear.png&images[]=left_clear.png&images[]=right_clear.png&images[]=lenses_lenses-semi-clear.png http%3a%2f%2fmy.site.com%2ffolder%2fshadez%2fzoom.php%3freturntype%3d2%26size%3dsmall%26images%5b%5d%3dbase.jpg%26images%5b%5d%3dframe_clear.png%26images%5b%5d%3dleft_clear.png%26images%5b%5d%3dright_clear.png%26images%5b%5d%3dlenses_lenses-semi-clear.png you can use encodeuricomponent & decodeuricomponen

Java Swing Exit Icon? -

i wondering how change minimize, maximize, , exit button icons in top left of default jframe swing window? i've looked everywhere , can't find tutorial or method it. minimize, maximize/restore , close buttons bound frame decoration used. if using frame decorated system (for example aero frame in windows 7) - cannot modify buttons since whole frame decoration provided system , there no good way invtervene , change behavior. on other hand - if using custom , feel (shorty - l&f) written on java , provides own frame decoration - possible modify if have access l&f sources or if l&f provides options add/remove buttons. you can read more l&f here: http://docs.oracle.com/javase/tutorial/uiswing/lookandfeel you can find lot of links custom l&fs here: java , feel (l&f)

android - Why it returns Internal Server Error on httpUrlConnection? -

i'm developing application can send different files web server.also want send large files, in able need chunk files. when i'm sending files server nothing uploaded. don't know if there's error on how i'm sending files , gives error 500 (internal server error) on response.i don't think server problem because when i'm uploading file using multipartentity works when im using bufferedinputstream , dataoutputstream doesn't work. please me , tell what's wrong on code why can't send files. here's got far: string samplefile = "storage/sdcard0/pictures/images/picture.jpg"; file mfile = new file(samplefile); int mychunksize = 2048 * 1024; final long size = mfile.length(); final long chunks = size < mychunksize? 1: (mfile.length() / mychunksize); int chunkid = 0; try { bufferedinputstream stream = new bufferedinputstream(new fileinputstream(mfile)); st

ios - Maximum time Intervel for NSTimer -

in our application have auto log out user if doesn't logged in week. what best method schedule it? used nstimer time interval of (24*7*60*60) work?. nb: login screen automatically shown after terminating app. case occurs when app minimized week nstimer gets paused when app in background. there every chance user run other apps, app go background. i tackle problem this when user login, take current time ( nsdate ) , save in nsuserdefault key "lastlogintime". whenever user starts/resumes app check current time saved time. if difference greater 1 week, call logout. if difference less 1 weak, update nsuserdefault value current time.

versioning - Calendar aligned version numbers for an unpaid application -

the internal application team works on on version 10.y.z.build_number . during discussion if next release significant enough 10.y+1.z.build_number or should 10.y.z+1.build_number suggested keep simple , align version numbers calendar. for example next release 13.8.1.build_number stands 1st release august 2013. september 1 13.9.1.build_number . the idea has been discarded now. for paid application can imagine having 1st number useful distinguish between releases free upgrades , major releases require paid update. x+1.y.z paid , x.y+1.z free. after quick search found jeff attwood's what's in version number, anyway? . however unpaid internal application cannot think of weak points calendar-aligned version numbers , beauty of simplicity speaks me. 1 of comments on jeff atwood's post says: microsoft office 2003 far more meaningful name microsoft office 11 . the question: vision clouded enthusiasm , there known issues calendar-aligned version numbers?

javascript - Get URL # fragment XMLHttpRequest -

im building chrome extension allow user select facebook posts , send them server. i have xmlhttprequest sending facebook in order receive access token follows: function gettoken() { var xhr = new xmlhttprequest(); xhr.open("get", "https://www.facebook.com/dialog/oauth?client_id=my_app_id_here&redirect_uri=https://www.facebook.com/connect/login_success.html&response_type=token"); xhr.send(); xhr.onreadystatechange = function() { if (xhr.readystate == 4 && xhr.status == 200) { xxxxxxxxxxxxxxxxxx xhr.close; } } } the xmlhttprequest sent server successful , receive access token in response dont know how access it. if have console window open on chrome , select network tab, can see request being sent, , response being received (with access token) received url fragment , don't have clue how access it. gettoken function executed in content script if makes difference. edit: xhr.responsetext follows success securi

javascript - Statistics circles in CSS -

Image
i don't know how. i have idea doesn't work. <div id="stats"> <div id="men" class="circle"></div> <div id="women" class="circle"></div> <div id="white-circle" class="small-circle"></div> </div> <style> #stats { width: 100px; height: 100px; background: white; position: relative; } .circle { border-radius: 100px; background: #ccc; width: 100px; height: 100px; position: absolute; } .circle#men { background: #27ae60; } .circle#women { background: #f26646; } .small-circle { border-radius: 100px; background: white; width: 65px; height: 65px; position: absolute; top: 0; bottom: 0; left: 0; right: 0; margin: auto; } </style> it called donut chart. difficult use div tag. instead use canvas or use javascript framework charting. here few examples. <ca

ruby - will_paginate helper undefined in sinatra with mongoid -

i using sinatra 1.4.3 , mongoid 3.1.4. tried adding will_paginate gem master branch mongoid support added gemfile: gem 'will_paginate', :git => 'git://github.com/mislav/will_paginate.git', :branch => 'master' in environment.rb added: require 'will_paginate' require 'will_paginate/mongoid' and pagination method started working. have still problem will_paginate helper. in views errors like: nomethoderror: undefined method `will_paginate' #<class:0x006ff5df8578b0> am missing helper work under sinatra? i don't know if it's best solution adding include willpaginate::sinatra::helpers in controller solved problems.

php - how to loop though an html table rows and put them in an array -

while($row=mysql_fetch_array($sqlquery)) { echo "<tr> <td>$row[name]</td><td> $row[number]</td><td> $row[mydatecol]</td><td>$row[mycheckboxcol]</td></tr>"; } i trying learn basic php , populating html table rows database table code above. now want on button submit convert data row values php array can manipulate. welcome. an html table can't submitted, if want should work form. apart that, it's easier create array while fetching database rows, this: while($row = mysql_fetch_array($sqlquery)) { $rows[] = array( 'name' => $row['name'], 'number' => $row['number'], 'mydatecol' => $row['mydatecol'], 'mycheckboxcol' => $row['mycheckboxcol'] ); }

android - How to highlight a clicked portion of an image and display a description panel -

Image
i trying learn special effects in android. want add image in android application. when user touch on particular portion of image, portion should highlighted , description panel regarding portion displayed (as displayed in example). example posted here please suggest method can used implementing effect. this not simple problem. the simplest solution i'd suggest in implement ontouchlistener x , y position of touch. using motionevent getx() gety() values . compare portions position know 1 highlight. the effect of displaying highlights on portions can achieve placing invisible pictures on top of main 1 (that represent highlighted portion in highlight color on transparent background, see mean?) , set them visible on user selection. description panel can included in invisible image or invisible layout set visible on selection (for example included in popupwindow or so...)

.net - Easiest way to extract 4 digit number out of string? -

if know string going like: abc xyz 5678 or qweroi yreoiu 4679 what best way extract last 4 digit string? in c# whole thing string mystring = "qweroi yreoiu 4679"; regex regex = new regex(@"\d{4}$"); match result = regex.match(mystring); you can use .tostring() if need keep working match. additional information regex recommend this article.

datagrid - dojo ContentPane OnMouseOut can"t work well -

the code below the problem contentpane html content cannot close when mouse move out of cell filled name field of grid. var mycontentpane; grid.on("cellmouseover",function(evt){ var cell=evt.cell; rowdata=grid.getitem(evt.rowindex); if(cell.field=="name"){ require([ "dojox/layout/contentpane", "dijit/popup" ], function(contentpane, popup){ if(mycontentpane){ popup.close(mycontentpane); } mycontentpane = new contentpane({ style: "width:300px;background:#dddddd", content:"html content string has links in it", onmouselea

r - Hmisc describe short version -

is there way show first 2 lines of output describe command in hmisc ? for data safety reasons can show n , missing , unique , mean in output , possibly histogram. this means have hide output lowest , highest frequencies , percentiles. is possible? if not i'll have calculate values myself. library(hmisc) res <- describe(rnorm(400)) #look @ structure. str(res) #it's list! can change objects in it. res$counts <- res$counts[1:4] res$values <- null print(res) #rnorm(400) # n missing unique mean # 400 0 400 0.05392

jquery - How to center embedded Google Map -

i have fancybox loads remote page via ajax. page uses jquery tabs plugin. on tab not activated default there embedded google map. code calls google maps <iframe width="740" height="380" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?z=16&amp;t=m&amp;q=<?= $geo['latitude'] ?>+<?= $geo['longitude'] ?>&amp;hl=ru&amp;output=embed"></iframe> the result map shows searched location in top left corner. want center map in coordinates $geo['latitude'] , $geo['longitude'] . i tried add different query parameters ll , sll , no success. tried set iframe preload setting of fancybox false - no result. should do? consider following example: <iframe width="740" height="380" frameborder="0" scrolling="no" marginheight="0" marginwidth="0

android - Get Public tweets Twitter API 1.1 -

i first time on twitter api's i going through https://dev.twitter.com/docs/api/1.1/get/statuses/user_timeline i need public tweets https://twitter.com/twitterapi the api 1.1 link says- authentication - required and found - authtool i couldn't connect these things, there no beginner tutorial available. my basic doubts - authentication required means - end user using app should have twitter account these tweets? ( planing mobile app ( android), show celebrity's public tweets ) where can find basic tutorials begin with? do need tokens pass request? how those? i had chance work on similar issue. let me questions first. does authentication required means - end user using app should have twitter account these tweets? no. end user need not have sign twitter account see public feeds. but, have use consumer key , secret key app have created in twitter developers website. do need tokens pass request? how those? as have explained pr

ubuntu 12.04 - can not read file from linux system using java -

i trying read/write files on ubuntu 12.04. set permission of directory chmod -r 777 . still when call canread() method on directory returns false. my directory /root/temp please me solve problem code ( copied comments ): file xyz = new file("/root/temp"); system.out.println("filename :"+xyz.getpath()); system.out.println("can read :"+xyz.canread()); string[] children = xyz.list(); children null , output of can read false . are running program root? not sufficient changing permissions of /root/temp , if not user root wont able "go through" dir /root unless change permissions of dir /root .

c# - create xml file, basics -

i want create xml document following structure <serverfp command="cashed"> <cashed value="199.99"/> </serverfp> so tried : xmlwritersettings settings = new xmlwritersettings() { indent = true }; using (var writer = xmlwriter.create(filename, settings)) { writer.writestartdocument(); writer.writestartelement("serverfp"); writer.writeattributestring("command", "cashed"); } is far , how end file? node <cashed value="199.99"/> why not linq xml ? xelement serverfp = new xelement("serverfp", new xattribute("command", "cached"), new xelement("cachedvalue", "199.99") ); console.writeline(serverfp.tostring()); outputting <serverfp command="cached"> <cachedvalue>199.99</cachedvalue> </serverfp>

html - Jquery Conflict between versions -

i have app works placing following within html header <link href="{{ media_url }}css/style.css" rel="stylesheet" type="text/css" media="screen" /> <link href="{{ media_url }}jquery/css/custom/jquery-ui-1.8.6.custom.css" rel="stylesheet" type="text/css" media="screen" /> <script type="text/javascript" src="{{ media_url }}jquery/js/jquery-1.4.2.min.js"></script> <script type="text/javascript" src="{{ media_url }}jquery/js/jquery-ui-1.8.6.custom.min.js"></script> however want use new bootstrap styling requires following, <script type="text/javascript" src="{{ media_url }}jquery/js/jquery-1.9.1.min.js"></script> <script type="text/javascript" src="{{ media_url }}jquery/js/bootstrap.min.js"></script> however mix 2 random bevaiour app, typically following error &q

javascript location href not working on jquery ajax post -

i have following issue: make jquery ajax post and, on success, need change location of browser index view. javascript: $.post(createreleasenotificationurl, notifications_form.serialize(), function (response) { if (response.indexof("error") == 0) { $("#newnotification_createstatus").html(response); } else { window.location.assign('@url.action("index")'); //window.location = window.location; } }) .fail(function () { $("#newnotification_createstatus").html("an error has occured.<br /> please contact system administrator<br /> if problem persists."); }); however, nothing happens !! missing ? ps: tried using location.href, no avail. check this: window.location.href = '@url.action("index", "controllername&

Security in TYPO3 by accessing File System -

i've readen book (in german) named cookbook typo3 , typoscript http://www.amazon.de/typo3-typoscript-kochbuch-typo3-programmierung/dp/3446410465 in book autor suggest in regards security typo3_src directory should moved out of root-directory of web-server, didn't why should that? can explain me reason of suggestion? vulnerablity exist if not move it? many thanks you should not make public doesn't need be. not making directory publicly accessible reduces 1 possible attack vector. might possible file in directory can made things bad when called directly. it is important if want secure system as possible.

android - generate dynamic id for multiple edittext with button click -

i have 1 row edittext . scenario when user clicks on button row added. somehow have achieved both edittext have same id. how assign id of edittext dynamically created. edittext in layout xml file. possible xml or have create edittext programatically. in advance. private void inflateeditrow(string name) { layoutinflater inflater = (layoutinflater) getsystemservice(context.layout_inflater_service); final view rowview = inflater.inflate(r.layout.row, null); final imagebutton deletebutton = (imagebutton) rowview .findviewbyid(r.id.buttondelete); final edittext edittext = (edittext) rowview .findviewbyid(r.id.req); if (name != null && !name.isempty()) { edittext.settext(name); } else { mexclusiveemptyview = rowview; deletebutton.setvisibility(view.visible); } // textwatcher control visibility of "add new" button , // handle exclusive empty view. edittext.addtextchanged

Authentication and Role in SOAP based Web Services (Java) -

please guide me understand following , technology should use best implementation: how many type of authorization/security have , 1 best. how can implement role based security. does same applies restful services well. the first question can interpreted in 2 ways. first, ask authentication method, protocol between client , server. here two: basic auth - client sends username , password in plain text in request. if making internal service (inside corporate network) or have encrypted channel (https) work fine. kerberos - works fine in windows world , controlled active directory. if try bring java, asking nightmares. second, can asking java framework handels security. can spring security instance. spring security positiones in filter chain in front of service. if request (using basic_auth instance) permitted gets through, otherwise not. spring security can configured find users in many many ways, database, own code, ldap (and active directory). the second questio

Android 2.3.6 support library v7 option menu is missing -

i'm using samsung gt-s5570i a busy cat http://jawal123.com/mobilesimages/bigimages/250/-471741899_27492.jpg can see screen small. os android 2.3.6. want create app action bar , menu (the 3 dots on right side on bar) using support library v7 i'll have backward compatibility . my prblem is, action bar shown option menu missing, tried run same code on api 17 , worked. i dont know whats problem, resolution? or old api? thanks. public class mainactivity extends actionbaractivity { actionbar ab; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); ab = getsupportactionbar(); ab.settitle("test"); } @override public boolean oncreateoptionsmenu(menu menu) { menu.add("normal item"); return true; } i suspect device has menu button. press menu button access overflow. standar

asp.net mvc 4 - Cannot load resource MVC 4 JavaScript -

Image
i need below error. cant seem find warehousejavascript.js file outside scripts folder. the url /views/warehouse/warehousejavascript.js invalid, because have make request controller instead of view. so should following: create controller warehouse not exist (i cannot see on printscreen) create action method above view in action method return view warehousejavascript in link use @url.action('warehouse','index') assuming controller name warehouse nad action index

function - Serial comma from array in PHP -

i trying make string serial comma array. here code use: <?php echo "i eat " . implode(', ',array('satay','orange','rambutan')); ?> but results get: i eat satay, orange, rambutan cannot: i eat satay, orange, , rambutan yet! so, made own function: <?php function array_to_serial_comma($ari,$konj=" , ",$delimiter=",",$space=" "){ // if not array, quit if(!is_array($ari)){ return false; }; $rturn=array(); // if more 2 // actions if(count($ari)>2){ // reverse array $ariblk=array_reverse($ari,false); foreach($ariblk $no=>$c){ if($no>=(count($ariblk)-1)){ $rturn[]=$c.$delimiter; }else{ $rturn[]=($no==0)? $konj.$c : $space.$c.$delimiter; }; }; // reverse array // original $rtu

cocoa - NSPredicateEditorRowTemplate: how to to populate right side popup -

Image
i trying generate nspredicateeditorrowtemplate on left side has number of property names entity foo , among property bar . when user selects ' bar ', right side should become popup contains values of ' bar '. how can best populate right side popup? unique values of bar stored in nsmutablearray , perhaps can use kvo change row template when array changes. is there way can use code change values in right side popup in nspredicateeditor row? can enter few static values in ib, not in situation. edit having read deal of related q&a's, including nspredicateeditor in xcode 4 , excellent answer @dave delong, think bit of work can done this: nsarray *leftexp = @[[nsexpression expressionforkeypath:@"name"],[nsexpression expressionforkeypath:@"married"]]; nsarray *rightexp = @[[nsexpression expressionwithformat:@"one"],[nsexpression expressionwithformat:@"two"]]; nspredicateeditorrowtemplate *template = [[nspredicat

oracle - VB.NET Multiple Selects at once using SQL Server CE -

i have array list contains ids items. perform multiple select @ once sql server ce database , using array list contains items id selected, similar when doing example multiple update in oracle (odp.net) explained here: oracle bulk updates using odp.net where can pass array parameter. i same multiple select instead in case of sql server ce. possible? draft do: sqlcecommand = sqlceconnection.createcommand() sqlcecommand.commandtext = "select * mytable id=:ids" sqlcecommand.commandtype = commandtype.text sqlcecommand.parameters.add(":ids", dbtype.int32, arraylistofids, parameterdirection.input) using reader system.data.sqlserverce.sqlcedatareader = sqlcecommand.executereader() using targetdb oracle.dataaccess.client.oraclebulkcopy = new oracle.dataaccess.client.oraclebulkcopy(con.connectionstring) targetdb.destinationtablename = "mytable" targetdb.batchsize = 100 targetdb.notifyafter = 100 targetdb.bulkcopyoptions = oracle.dataa

pie chart - Rails and pie.htc does not load -

i put in pie.htc alert('works'); and move pie.htc every folder of project. in css try this: behavior: url('/assets/pie.htc'); behavior: url(/assets/pie.htc); behavior: url('pie.htc'); behavior: url('/public/pie.htc'); but not load - dont see alert pie.htc. what should write in css , put pie file.

sqlite - .insert() & .execSQL() causing NULL Pointer Exception in Android -

i keep getting null pointer exception via execution of insert statement. all trying insert new row tbl_building table. here code: declaring database: sqlitedatabase sampledb; to retreive context database: if(value == "retrieve"){ sampledb = getbasecontext().openorcreatedatabase(clientlist.retrievedclient+".db", mode_private, null); } else if (value == "create"){ sampledb = getbasecontext().openorcreatedatabase(createclient.createdclient+".db", mode_private, null); } to insert data table: templateselected = 0; try { templateselected = integer.parseint(selectedtemplate.tostring()); log.e("int : ", selectedtemplate); } catch(numberformatexception nfe) { string error = nfe.tostring(); log.e("could not parse: ", error); } for(int = 0; < templateselected; i++){

ios - Override Double Tap to Zoom in MKMapView -

is possible replace gesture in ios 6 custom gesture? have gesture show map in full screen hiding status , navigation bars , works zooms every time done. here how have gesture implemented. - (bool)gesturerecognizer:(uigesturerecognizer *)gesturerecognizer shouldrecognizesimultaneouslywithgesturerecognizer:(uigesturerecognizer *)othergesturerecognizer { return yes; } in viewdidload: uitapgesturerecognizer *tap = [[uitapgesturerecognizer alloc]initwithtarget:self action:@selector(togglebars:)]; tap.numberoftapsrequired = 2; [self.view addgesturerecognizer:tap]; tap.delegate = self; gesture method: - (void)togglebars:(uitapgesturerecognizer *)gesture { bool barshidden = self.navigationcontroller.navigationbar.hidden; if (!barshidden) { [[uiapplication sharedapplication] setstatusbarhidden:yes withanimation:uistatusbaranimationslide]; [self hidetabbar:self.tabbarcontroller]; } else if (barshidden) { [[uiapplic