Posts

Showing posts from January, 2015

asp.net mvc - Why not supported font-awesome in firefox browser, after bundles the css file? -

i using font awesome in css during websitework, after css bundles int0 asp.net mvc4 , font-awesome not rendering in firefox browser? why not support in firefox , why supporting in chrome. thank in advance.. i had same problem font awesome icons not rendering in firefox , found out has security settings firefox defaults with. in browser go "about:config". search "security.fileuri.strict_origin_policy". set true default. if double click flip false. restart browser (make sure close way). icons should show fine now.

python - Shorter way to check if a string is not isdigit() -

for sake of learning, there shorter way do: if string.isdigit() == false : i tried: if !string.isdigit() : , if !(string.isdigit()) : both didn't work. python's "not" operand not , not ! . python's "logical not" operand not , not ! .

Git porcelain command to revert a single file to its HEAD state but keep its staged state? -

is there git porcelain command revert working dir state of staged file head state , @ same time keep staged state of file? later able revert working dir state staged state of file. initial thought use git checkout head -- targetfile , resets staged state of file too. see doable git stash , affects other files while focus on single file , preserve state of others untouched otherwise lead merge conflicts: git add targetfile git stash ... // modify tagetfile in seeking of different task solution, possibly modifying other files git checkout head -- targetfile //drop different solution attempt, keep other modified files if git stash apply --index // revert stashed staged solution, produces merge conflict other modified files i found nice article summary table @ end lacks scenario described in question. in opinion should feasible, surprised staged , working dir states tightly coupled - can reset staged state file while preserving working dir state, have hard time achieve opposite.

architecture - IBM Worklight session control with back-end server -

got question on ibm worklight server, in advance comments on subject. workflow: user --> worklight server --> back-end server scenario: (1) designed mobile application ibm worklight studio , deployed worklight server. (2) must use worklight server first entry point (user authentication ldap via worklight server) (3) mobile application designed downloading/uploading huge file size (10mb 1gb) backend server behind worklight server (refer workflow pls.) question(s): (1) how session sharing can done in between worklight server , back-end server? (2) if session sharing cannot done, what's safest way mobile application download/upload files back-end server given application , back-end server not know same authenticated transaction skipping worklight server? (3) did misunderstood worklight server architecture? far know worklight server kind of gateway , presentation layer deploying mobile application framework. heavy , complex computation logic should handled

Set backcolor for specific cell in gridview in VB.net Visual Studio -

Image
i have fixed size grid , specify backcolor of specific cells within grid, not whole rows , not whole columns single cell or maybe range of cells. please see screenshot below , example of mean. ideally via vb alter backcolor based on values selected dropdown list. edit: based on answer below modified until got below worked. gridview.rows(n).cells(n).backcolor = drawing.color.fromargb(n, n, n) assuming creating windows forms application, can use datagridview. allows individual cells styled using following property: datagridview1.rows[0].cells[0].style.backcolor = color.red

html - error in syntax with php code -

i trying encode synopsis following code <?php <li><a href="?page=<?php echo base64_encode("("synopsis")&lang=hn");?>" <?php if($page == 'synopsis'){?>class="active"<?}?>>dec</a></li> ?> but when try encode shows error like parse error: syntax error, unexpected t_string in /var/www/html/header.php on line 33 please, me syntax error. not able solve it any appreciated leave surrounding <?php .. ?> off when use file template. you have escape " when inside double quotes: "(\"synopsis\")&lang=hn"

javascript - JS validate custom rule for checking array not empty? -

i have array called filequeue. var filequeue = []; how can write custom rule js validate check in array? thanks if(filequeue.length == 0) //empty else //non-empty

data analysis - Finding matrices correlation -

i have 2 matrices (a , b) have same rows , cols. want compare them in order find if there row in associated values in matrix less values of same row in matrix b. e.g. a: [5.5 5.8 5.9; 2.3 2.5 2.7; 9.1 9.2 9.0] b: [5.6 5.3 5.7; 7.8 7.9 7.5; 9.0 9.5 8.9] and interested in row 2 values less other matrix.

Filling pseudo 3D canvas shapes -

Image
currently i'm playing around pseudo 3d shapes in canvas 2d context. however, stuck yet @ filling shape sides. here's drawing function wrote: shape.prototype.draw = function (ctx) { var offsetx = ctx.canvas.width / 2; var offsety = ctx.canvas.height / 2; var = this.edges.length; while (i--) { var vertex1 = this.rotatedvertexs[ this.edges[i][0] ]; var vertex2 = this.rotatedvertexs[ this.edges[i][1] ]; ctx.beginpath(); ctx.moveto(vertex1[0] + offsetx, vertex1[1] + offsety); ctx.lineto(vertex2[0] + offsetx, vertex2[1] + offsety); ctx.fill(); ctx.stroke(); } }; ...and simple example fiddle: http://jsfiddle.net/artsinn/xyzyu/ any ideas i'm doin' wrong? your drawing function works in "lines", not "faces" of square. you cannot fill line. need @ least 2 lines in same path create fill-able area. (note every time you're calling beginpath , you're making

xcode - Too many open files iOS -

i new on ios programming, when app running , taking these errors. loading 950+ images in app , using arc. imageio: cgimageread_mapdata 'open' failed '/users/apple/library/application support/iphone simulator/6.1/applications/16551664-4694-4742-85dc-2c3c0adc5289/demo.app/menu-24-20.png'error = 24 (too many open files) imageio: cgimageread_mapdata 'open' failed '/users/apple/library/application support/iphone simulator/6.1/applications/16551664-4694-4742-85dc-2c3c0adc5289/demo.app/menu-24-20.png'error = 24 (too many open files) imageio: cgimageread_mapdata 'open' failed '/users/apple/library/application support/iphone simulator/6.1/applications/16551664-4694-4742-85dc-2c3c0adc5289/demo.app/circle_green.png' error = 24 (too many open files) imageio: cgimageread_mapdata 'open' failed '/users/apple/library/application support/iphone simulator/6.1/applications/16551664-4694-4742-85dc-2c3c0adc528

linux - How to show the totall amount of process ,main memory, virtual memory usage in SYSTEMTAP? -

i wanna write script monitors 1 (selected) item component following operating systems: process management management of main memory virtual memory management management of input / output network management and came idea how show it: process | main memory | virtual memory | input/output | network % usage | % usage | % usage | ??? | data send/recived i don't know how show % usage of cpu, main memory, , virtual memory. don't know manage in input/output. systemtap better suited monitoring events rather levels of those. consider using pcp ( http://oss.sgi.com/projects/pcp ) simple periodic level monitoring.

c# - Mono for Android Texting/Email -

texting , email not documented android ios is, know code documented or tell me? thank you! you're confusing terms - monotouch old name xamarin.ios. mono android old name xamarin.android. presumably you're asking "how send mail , texts xamarin.android?" send e-mail: http://docs.xamarin.com/recipes/android/networking/email/send_an_email send text: http://docs.xamarin.com/recipes/android/networking/sms/send_an_sms

django - Use sha256 hashes instead of plain text passwords -

my country's government has restricted https speed block access secure web services out side iran. clients in pain logging in accounts. know current account passwords encrypted , salted using pbkdf2_sha256 algorithm , there javascript/jquery libs digest sha256 hashes. my question: there painless way (which not require rewriting/changing original django.contrib.auth ) use sha256 hashes sent ajax requests login password? update: i'm planning host sites inside iran (which 5 times more expensive , of course controlled government) @ least https protocol not restricted. sending passwords either in plain text or digested way via http channel insecure anyway. while web developer (and not network expert) think can collect/sniff hashes/session ids/cookies anytime want, solving problem needs sophisticated knowledge , efforts , after site not require level of security. live in different planets. you can write own authentication backend use raw passwords: from django.co

c# - MS Chart - How to put the X label on the left for a column series -

Image
i working on graph (sorry it's first post, reputation can't post image directly) : graph working on for giving hour, example 10h, y value represents number of requests between 10h , 11h. as can see on graph, columns centered on x label. question quite simple, how put label on left of column, on graph columns between 2 labels. in resume, looking way on every columns : what looking for in case need this, here pertinent lines of code graph myadapter.fill(dailydata); // add points series (int = 0; < dailydata.rows.count; i++) { datarow row = dailydata.rows[i]; if (int.parse(row["hours"].tostring()) < 10) { dailychart.series["series1"].points.addxy("0" + row["hours"].tostring() + "h", row["requestsnumber"].tostring()); } else { dailychart.series["series1"].points.addxy(row["hours"].tostring()

css - Styling kentico ASP.Net Template -

i created asp.net template , styling suite has not been fun not locate main stlyesheet. template corporate site. better still, can edit corporate site template suit design? need locate stylesheet. go sitemanager->development->css stylesheets , edit corporate site style sheet. see documentation .

javascript - Google Crawler Jquery URL -

does google crawl link created jquery this? $(div).append("<a href='url_to_crawl'>my url</a>"); if not, have idea how solve problem? thank help. br, chris quoted article: http://www.seomoz.org/ugc/can-google-really-access-content-in-javascript-really yes, google can execute javascript find content google has limitations on can do, , can understand. best practice remains same: put content want google crawl , index in basic html. example, use jquery tabs put content on 1 file instead of ajax tabs spreads out content across several files. in short, make easy google access content. take @ article understand more bot can crawl.

Making multiple gradients using Less CSS -

this first project i've used less on, want make series of buttons have same general structure have different gradiated colours applied them. i have default button style: .button-regular (@origin: top, @start: #d2d2d2, @middle: #7a7a7a, @stop: #4d4d4d, @fallback: #3f4c6b, @border: #3c3c3c;) { border-radius: 3px; color: @white; font-size: 13px; line-height: 18px; height: 36px; font-weight: normal; padding: 8px 15px 8px 15px; text-align: center; background: @fallback; background: -moz-linear-gradient(@origin, @start 0%, @middle 6%, @stop 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, @start), color-stop(6%, @middle), color-stop(100%, @stop)); background: -webkit-linear-gradient(@origin, @start 0%, @middle 6%, @stop 100%); background: -o-linear-gradient(@origin, @start 0%, @middle 6%, @stop 100%); background: -ms-linear-gradient(@origin, @start 0%, @middle 6%, @stop 100%); background: linear-gradient(to bottom, @start 0%, @midd

.htaccess - Forcing www for part of my site -

i'm trying set .htaccess force www 1 folder of site, not rest of it. know how this? use solution here: .htaccess - how force "www." in generic way? but put .htaccess in directory want force www subdomain in. .htaccess files evaluated if they're in directory in directory file you're serving resides or of parent directories, other directories unaffected. you should, however, not begin with. forcing "www" subdomain annoying enough - , domains sexier without ;) - doing directories going confuse people.

xcode - Imnitializing a prmitive array - corrupting other arrays -

i using primitive array type in xcode. example: int matrix [10][10]; i using simple loop initialise array for(int x=0;x<=10;x++) for(int y=0;y<=1;0y++) matrix[x][y] = 0; i initialize sevreal matrices in manner throughout code. noticed @ times after initialization performed, array prviously initialized or updated contains garbage. there simpler way initialize array of type. and/or why seem corrupt other arrays. your array has 10 positions in both dimensions, loops go eleven. try for(int x = 0; x < 10; x++) for(int y = 0; y < 10; y++) matrix[x][y] = 0; notice use of lesser than comparator instead of lesser or equal to .

Android -- Cannot get the videos streaming from my server -

i using following code stream videos server on android phone: intent = new intent(intent.action_view); i.setdata(uri.parse(videourl)); // when hit url in web browser on pc, works startactivity(i); when run code, asks me select player. when select player, player opens , nothing happens. i've tried waiting minutes, video never starts. my question is, simple put video on webserver , on android run above code video streaming? do need make changes on server? can please me this? cannot figure out if problem sever or client side. it problem of vlc player using on android phone testing. downloaded mx player , tried that. working fine :-) that means not every video player on google play mature enough take url , start streaming video. need video player supports feature.

PHP fread ssh stream significantly slow -

scenario: needed function stdout of command run through ssh asynchronously. has various uses including (and importantly) reading files through ssh. important feature of function is asynchronous, hence can display output returned server (or give estimate of file download progress). differs common approach of using ssh_move() download files. function ssh_exec($dsn, $cmd, $return=true, $size_est=null){ $buffer_size = $return ? (1024 * 1024) : 1; debug('ssh2_exec '.$cmd); $stream = ssh2_exec(ssh_open($dsn), $cmd); debug('stream_set_blocking'); stream_set_blocking($stream, true); debug('ssh2_fetch_stream'); $stream_out = ssh2_fetch_stream($stream, ssh2_stream_stdio); stream_set_blocking($stream_out, true); debug('stream_get_contents'); $data = ''; $stime = $oldtime = microtime(true); $data_len = 0; if(!$return){ write_message("\033[0m".' execution output:'.php_eol.'

java - how to add deault image in directory??? when create new directory -

how add default image when create directory? code below create directory using alert dailog, want add default image automaticallly if directory created, do? deault image id (r.drawable.myimage) . want add image in directory when directory created. alertdialog.builder alert = new alertdialog.builder(context); alert.settitle("add new photo folder"); // set alert dialog // title here alert.setmessage("enter folder name "); // message here // set edittext view user input final edittext input = new edittext(context); alert.setview(input); alert.setpositivebutton("ok", new dialoginterface.onclicklistener() { public void onclick(dialoginterface dialog, int whichbutton) { string srt = input.geteditabletext().tostring(); toast.maketext(context, srt, toast.length_long).show(); file photos = new file(getfilesdir(), srt); if (!photos.exists()) { photos.mkdirs(); gridview.invalidateviews(

delphi - Inno setup command line progress -

how can progress when i'm executing inno script command line compiler (iscc.exe)? i can pipeline output want % completed well. use iscmplr library instead. inspiration, basic delphi innosetup compiler might (of course without hardcoded paths). uses original compint.pas unit innosetup source pack: unit unit1; interface uses windows, messages, sysutils, variants, classes, graphics, controls, forms, dialogs, stdctrls, comctrls, compint; const complib = iscmplrdll; comppath = 'c:\program files (x86)\inno setup 5\'; compscriptproc = {$ifndef unicode}'isdllcompilescript'{$else}'isdllcompilescriptw'{$endif}; type tcompscriptproc = function(const params: tcompilescriptparamsex): integer; stdcall; pappdata = ^tappdata; tappdata = record lines: tstringlist; linenumber: integer; statuslabel: tlabel; progressbar: tprogressbar; end; type tform1 = class(tform) label1: tlabel; button1: tbutton; progr

Get java version that was used to compile class -

this question has answer here: how check jdk version used compile .class file [duplicate] 5 answers is possible somehow java version used build class? there information compiled class file? possible there specific headers/footers or that. yes. can find version of jdk on class compiled. refer here .

drawable - Map Marker icon animation (Google Maps API V2 for Android) -

on custom event, need marker update drawable 6 times (basically, want marker grow , shrink 3 times delay of 0.5 s between each growth , each shrink) notifies user of said event. is there way achieve without having remove marker , adding again different drawable ? i'm afraid there no way today without removing marker , adding again drawable. have done myself in attempt create progress bar. works, awkward way of doing it. click here explanation in thread.

javascript - Filtering Data with on click function -

i have 2 array objects hold d3.svg.symbol types circles, squares & triangles. array #1 has multiple symbols plot across canvas, whereas array #2 holds 3 symbols aligned together. my goal able click on array #2 filter out of array #1 symbols dont want see. e.g. clicking circle in array #2 mean circles shown in array #1. var array1 = svg.selectall(a.array1) .data(json).enter().append("a") array1.transition().duration(1000) .attr("transform", function(d,i) {return "translate("+d.x+","+d.y+")" ;}) array1.append('path') .attr("d", d3.svg.symbol().type(function(d) {return shape [d.country];}).size(120)) var array2 = svg.selectall(g.array2) .data(filt) .enter().append("g") .attr("transform", function(d,i) {return "translate("+d.x+",&q

ruby on rails - What's the best way to update items that belong to a collection? -

i have section model has many sectiontests. each sectiontest has 'position' attribute. i creating screen allows user alter position attribute sectiontests in section. i'm updating single attribute of collection. what best way of doing in routes , controller? here current routes file : resources :sections resources :section_tests end my first thoughts in 'edit' action of 'section_tests' controller, 'edit' used edit attributes of single model. where put code? if understand correctly, trying update section linked section_test? use active record callback after_save in sectiontest model.

android - Premade database. Keeps forcing close. Sqlite errors -

i have made premade 1 , trying use asset folder keep getting errors. 05-02 14:58:44.771: e/database(573): sqlite3_open_v2("/data/data/com.mc.chempal/databases/chempaldb.db", &handle, 2, null) failed 05-02 14:58:44.792: e/androidruntime(573): fatal exception: main 05-02 14:58:44.792: e/androidruntime(573): java.lang.runtimeexception: unable start activity componentinfo{com.mc.chempal/com.mc.chempal.sqlview}: android.database.sqlite.sqliteexception: unable open database file 05-02 14:58:44.792: e/androidruntime(573): @ android.app.activitythread.performlaunchactivity(activitythread.java:1647) 05-02 14:58:44.792: e/androidruntime(573): @ android.app.activitythread.handlelaunchactivity(activitythread.java:1663) 05-02 14:58:44.792: e/androidruntime(573): @ android.app.activitythread.access$1500(activitythread.java:117) 05-02 14:58:44.792: e/androidruntime(573): @ android.app.activitythread$h.handlemessage(activitythread.java:931) 05-02 14:58:44.792: e/androidruntime

sql server - "No Join Predicate" when adding an additional condition - why? -

i have a, in general, simple query , don't understand why actual execution plan shows me warning "no join predicate" right after initial select on "nested loops" node. i think query pretty self-explanatory: have users , have usersubscriptions feeds (m:n) - want query feeditems 1 feed user must subscribed to, query well: select fi.title, fi.content, fi.published [user] u inner join usersubscription on u.id = us.userid inner join feed f on f.id = us.feedid inner join feeditem fi on fi.feedid = f.id u.emailaddress = 'xxx@xxx.xx' , f.id = 3 , fi.inserted > getdate() - 30 the interesting part there no warning long leave out condition: and f.id = 3 as remove this, warning missing join predicate disappears. don't understand cause warning here. any understanding appreciated! thanks b. the reason don't need join on feed table because: f.id = us.feedid = fi.feedid the f (feed) table isn't used/necessary anywhere else

objective c - Update File Name on Amazon S3 with IOS -

i know there no folder or directory concept on amazon s3, want update or delete folder according app's users needs. to delete folder guess have delete files 1 one in folder with: - (s3deleteobjectresponse *)deleteobjectwithkey:(nsstring *)thekey withbucket:(nsstring *)thebucket http://docs.aws.amazon.com/awsiossdk/latest/classes/amazons3client.html#tasks but there no documentation update object name lets folder name photos , there 2 files in folder image.png , image2.png means have photos/ photos/image.png photos/image2.png i want change folder name photos1 means have change image.png , image2.png to: photos1/ photos1/image.png photos1/image2.png how can accomplish this? is closest can get? ( copyobject ) your thinking correct. can't rename 'folder'. must process each file individually creating copy desired name , deleting original. also, aware according docs ( http://docs.amazonwebservices.com/amazons3/latest/api/index.html?restobject

c# - Why do ASP elements in templates not exist in current context? -

in aspx file, have insertitemtemplate inside of asp:formview. template consists of form made asp:textbox, droplists, etc. form going nothing take user input, pass stored procedure on sql server , insert data. i've tested sp separately, , works fine. problem asp formviews , templates make no sense me. it's data input in fields doesn't exist it's not passed sp nothing inserted. when add parameters codebehind, told doesn't exist in current context. if copy 1 of textbox, unchanged, outside formview, magically exists in current context. forgive ignorance, what's point of insert template if can't pass info inserted? code (abbreviated brevity): <asp:formview id="patientformview" datasourceid="sqldatasource1" gridlines="both" runat="server" defaultmode="insert" horizontalalign="left" width="800"> ... provider name: <asp:textbox id=

c++ - Can't get passed error LNK2001: unresolved external symbol, even if I seem to have included what is needed -

i trying create game c++ , smfl 2.0 , cant pass error , it's driving me crazy. have been reading around internet , seems can caused because of forgotten includes, still cant see have gone wrong. have included smfl 2.0 library in project properties section under c++ -> general -> additional include directories , under linker -> general -> additional library directories. i'm blank , error message get: 1>------ build started: project: pang, configuration: debug win32 ------ 1> game.cpp 1> generating code... 1> skipping... (no relevant changes detected) 1> pang.cpp 1>game.obj : warning lnk4075: ignoring '/editandcontinue' due '/incremental:no' specification 1>game.obj : error lnk2001: unresolved external symbol "private: static class playerpaddle game::_player1" (?_player1@game@@0vplayerpaddle@@a) 1>c:\users\alexander\desktop\c++\projects\pang\debug\pang.exe : fatal error lnk1120: 1 unresolved externals =====

Determing how many Bytes a file contains - Assembly -

im having assignment requires me open file , stuff in :) as searching on how read file, reached website ;its pretty , easy introduction http://stuff.pypt.lt/ggt80x86a/asm6.htm here mate says should provide number of bytes in cx int21h.. if don't know how many bytes file conatains?? ah = 3fh bx = handle cx = number of bytes read ds:dx = segment:offset of buffer is there way find out :? before calling function, set cx size of buffer receive data. when function returns ax have number read. if file shorter cx, ax < cx. if same or longer ax = cx.

scala - restrict implicit parameter resolution scope -

i find need write function inner recursive helper function, , takes same parameter list outer function, additional accumulator argument: def encode(tree : tree, text: string):string = { def rec(tree: tree, text:string, result:string):string = ??? rec(tree, text, "") } i want simplify : def encode(tree : tree, text: string)(implicit result:string = "" ):string this can remove inner function definition, has problem of that, see if need call function lookup inside encode , , lookup takes implicit parameter of type string, implicit result:string = "" implicitly pass lookup function. def lookup(tree : tree, text: string)(implicit result:string = "" ):string i don't want happen, there way restrict implicit parameter in lookup resolving outside of function? or other better ideas? how using normal default argument instead , passing accumulator explicitly in implementation: def encode(tree : tree, text

javascript - Update <div> with JSONP value jQuery -

i'm getting temperature service called world weather online i'm trying update weather <span> content this: (i have values correct, doesn't change value when open page) <div class="temperature"> <span>washington, usa</span> <span id=temp>temperature</span> </div> <script type="text/javascript"> var uri = "http://api.worldweatheronline.com/free/v1/weather.ashx?q=washington&format=json&num_of_days=1&date=today&key=dfghjkiuytdfghjkj"; var temp = 0 $.get(uri, function(r,status) { current_temp_c = r.data.current_condition[0].temp_c; temp = r.data.current_condition[0].temp_c; }, "jsonp") $('#temp').text("hola " + temp) </script> i know not best way it, ideas? $('#temp').text("hola " + temp) should inside callback var uri = "http://api.worldweatheronline.com/free/v1/w

reference - javascript setting attribute of prototype to attribute of object -

to begin with, don't understand prototypal structure of javascript may not possible. if have ... var vector = function( x, y ) { this.x = x || 0; this.y = y || 0; } var obj = function() { this.position = new vector( 0, 0, 0 ); } var cube = new obj(); ... how can add property x obj such calling cube.x equivalent cube.position.x . think should possible make properties of each reference same value, i'm not sure of syntax. obj.prototype.x = obj.position.x doesn't work because obj.position undefined. i following behaviour possible alert(cube.position.x); // 0 alert(cube.x); // 0 cube.position.x = 2; alert(cube.position.x); // 2 alert(cube.x); // 2 cube.x = 4; alert(cube.position.x); // 4 alert(cube.x); // 4 is possible? i should mention i'm working three.js rewriting objects isn't option, adding them , prototypes. to cube.x return whatever cube.position.x contains, you'd need define accessors , mutators obj.prototype.

email - Adding "cc" to mail task in ANT -

this regarding regarding "sending e-mail" task in ant. want add "cc" in send-mail target. when addded "cc" e-mail, giving me exception "mail doesn't support nested "cclist" element". can please let me know issue is. below ant target sending e-mail. <target description="generates , send junit test reports" name="send-report"> <mail mailhost="smtp.gmail.com" mailport="25" password="testing" ssl="true" subject="junit test reports timescity" user="testing@gmail.com"> <from address="teseting@gmail.com"></from> <replyto address="testing@gmail.com"></replyto> <to address="abc@gmail.com"></to> <cclist address="xyz@gmail.com"></cclist> <message>testing sending email</message> <attachments> <fil

ios - Grayscale UIView and all its sub children -

is there way override views render methods (drawrect: maybe?) make render , subviews in gray scale? right fake generating grayscale uiimage uiview using core graphics, , put in on top of uiview. have view still function animations etc. displayed in grayscale?

c - Fully Persistent B+ Tree -

i'm trying implement b+ tree (in c language) each key being data(int/float/string) , corresponding value list, size not fixed. i want store tree in file , access later on, when required. may consider implementation follows: each search key corresponds page in file and each page contains set of values corresponding key the problem is: cannot assign page key, may consume little , waste entire page. need persistent way of implementing b+ tree in file system, instead of main-memory. check disk-based b-tree implementation out, might help. and paper titled fully persistent b+-trees

sql server - Is there any secured way to connect to a sql mdf file database? -

i want connect project (asp.net forms app) database using .mdf file. is there secured way connect sql server .mdf database file user , password? if i'll publicate application in public server there safe? thanks in advance

Magento category page is blank How can i see the error message -

my category pages http://magento-36664-riki.vpsapps.net/ceiling-lights.html?___store=default blank.even when try search product blank page. think whole catalog not working. i try change layout of category office same result is there way see error ? i checked server error.log file , find message "directory index forbidden options directive" now again checked server error log. getting error"now getting error in server error log"php fatal error: allowed memory size of 268435456 bytes exhausted (tried allocate 241172481 bytes) in /var/www/kkemerce/htdocs/app/mage.php on line 842 [fri may 03 06:26:44 2013] [error] php fatal error: class 'mage' not found in /var/www/kkemerce/htdocs/app/code/core/mage/core/functions.php on line 0" i think got blank page due php errors. make magento show errors, should enable developer mode editing index.php bellow: .... #if (isset($_server['mage_is_developer_mode'])) { mage::setisdeveloperm

how to access session variable in the file routes.php using cakephp 2.0? -

i'm needing access session variable in routes file. (routes.php) know how can this? if not possible, there way access session variable in bootstrap.php? thank you you can start sessions far know. app::uses('cakesession', 'model/datasource'); $value = cakesession::read('your-value');

cordova - Phonegap window.open does not work on Android -

i have ios/android app built on cordova 2.6 , jqm 1.3. need open link external website after user clicks on button. code using is: var ref = window.open('http://google.com','_self','location=yes'); ref.addeventlistener('loadstart',function(event) { console.log('load started'); }); ref.addeventlistener('loadstop',function(event) { console.log('load stopped'); }); ref.addeventlistener('loaderror',function(event) { console.log('load error = ' + json.stringify(event)); }); on ios performs expect. new browser window opens google website loaded. cannot to load in android. when click on button, nothing happens. have put in console statements before , after window.open, know code @ least being executed. my config.xml should wide open white listed sites: <access origin=".*"/>; i have tested on nexus 7 (android 4.2) , android 2.2 emulator same results on both. does know why win

Lotus Notes Agent to forward an email on a button press -

i add butoon toolbar in lotus notes performs following actions when clicked on: forward selected email (in preview pane), cc'ing sender of original email, , standard text cc'd body of email. any advice on start appreciated. have been trying work out notes user guide not getting far. thanks much, rob. create new toolbar button clicking file\preferences...\toolbar\customize\new\button... , use toolbar button formula: _from := @text(from); @command([mailforward]); @command([editnextfield]); @command([editinserttext]; _from); @command([editgotofield]; "body"); @command([editinserttext]; "your text" + @newline + "goes here...")

plsql - ORACLE trigger check if each value of a row is different to each other -

ist possible compare on insert , update if values different each other (except null)? have 10 columns numbers , doesnt want write each possibility if statement. example: column_1 | column_2 | column_3 -------------------------------- 5 2 4 <- allowed insert 1 2 1 <- forbidden insert/update, because there 2 '1' in row i think you're going need have explicit comparisons. can use check constraint make comparisons, in create table some_table (col1 number, col2 number, col3 number, col4 number, col5 number, col6 number, col7 number, col8 number, col9 number, col10 number, constraint some_table_ck1 check(col1 not in (col2, col3, col4, col5, col6, col7, col8, col9, col10) , col2 not in (col3, col4, col5, col6, col7, col8, col9, col10) , col3 not in (col4, col5, col6, col7, col8, col9, col10) , col4 not in

matlab - Second x-axis label not fitting inside figure -

i trying add second x-axis figure. seems working, second axis label displayed half-outside of figure. is, see bottom half of "2nd axis" displayed. here small example demonstrate problem: close all; ax1 = gca; set(ax1,'xcolor','r','ycolor','r') xlabel(ax1, '1st axis'); data=rand(10,2); line(data(:,1), data(:,2), 'color', 'r'); ax2 = axes('position',get(ax1,'position'),... 'xaxislocation','top',... 'yaxislocation','right',... 'color','none',... % necessary, or axes not appear 'xcolor','k','ycolor','k'); xlabel(ax2, '2nd axis'); data=rand(10,2); line(data(:,1), data(:,2), 'color', 'k','parent', ax2); is there better way position axis label besides 'top'? or there way "fit inside figure"? this command you: 'acti