Posts

java - Making my computer prompt me with a predeterminedquestion whenever I open firefox -

i'm inspired reading john conway's wikipedia page: http://en.wikipedia.org/wiki/john_horton_conway#algorithmics i want have window pop whenever open firefox ask question code. i'd type in response in text box , upon hitting return display answer , whether i'm correct or not. i'm thinking of right i'd random number in centimeters between, say, 0 , 300 , try correct amount of inches corresponds to. i have no idea how start going this. how make program execute when click , turn on browser? have experience swing perhaps use i've looked through of swing library no avail. put java tag there because it's language i'm familiar solution in java best if possible. also, there resources learn how stuff this? i think main problem getting prewritten code run upon opening browser. rest can deal in swing i'm not sure. lastly, sorry non-space between predetermined , question, site doesn't let me use second word in title though makes sense here. ...

caliburn.micro - Is it possible to have Intellisense in XAML when using Caliburn automatic datacontext? -

when use caliburn, view gets datacontext set dynamically @ runtime convention. however, nice if set in designer vs , compiler verify , provide intellisense without interfering caliburn binding. if set myself, like: datacontext="myapp.mainviewmodel" i don't caliburn binding. is possible set designer? i think can take advantage of design-time support provided caliburn.micro. you have set desinger-datacontext , tell cm enable magic in view xaml: xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:vm="clr-namespace:caliburndesigntimedata.viewmodels" xmlns:cal="clr-namespace:caliburn.micro;assembly=caliburn.micro" mc:ignorable="d" d:datacontext="{d:designinstance type=vm:mainpageviewmodel, isdesigntimecreatable=true}" cal:bind.atdesigntime="true" for work, viewmodel must have default cons...

c# - How to update a user? -

the goal update user's table consistently. the problem i have edit information of specific user , don't know how. firstly, there's users table on application stores information of user. secondly, can't think in recursive way this. there're multiple columns on users table , don't know how edit columns user requested. any idea? what want? i'm not executing query through c#. need database came via stored procedure. (except basics .select() , firstordefault() , etc.). in other words, need 2 things: a (mysql) recursive query syntax idea; i need c# method invoke stored procedure this: user user = new user("chiefmaster@test.com"); // target of update. updateuser (user.email => "masterchief@test.com", // old "chiefmaster@test.com" user.nickname => "masterchief" // old "chiefmaster"); as can see, i'm updating email , nickname of specific user — should not affect ot...

jquery - Triggering audio on hover and triggering different audio on click of same div? -

i have div image in it. on hover of image want 1 audio play, on click of same image want audio play. code far, doesn't seem work? ideas? thanks <div id="one"> <img src="lib/images/check-mark-32.png" alt=""/></div> <audio id="sound-1a"> <source src="lib/sound/01 partitano.1.mp3"></source> <source src="lib/sound/01 partitano.1.ogg"></source> browser isn't invited super fun audio time. </audio> <audio id="sound-1"> <source src="lib/sound/01 solo piano - 1 - metamorphosis.mp3"></source> <source src="lib/sound/01_solo_piano_1_metamorphosis.ogg"></source> browser isn't invited super fun audio time. </audio> <script> var audio = $("#sound-1a")[0]; $("#one").mouseenter(function() { audio.play(); }); var audio = $("#sound-1")[0]; $("#one").click(functi...

javascript - Need to hide a selected element based on conditions -

i have drop down menu various options new in progress ordered not ordered completed cancelled i have form need hide eta row when status new, enable other status. tried: var progress, ordered, unordered, completed, cancelled, reg, high, user, trimuser, etadate, etarow, etahour, etaminutes; function initiate() { //declaring necessary variables declaration() } function declaration(){ //declaration of variables status changes snew = $("option[value='new']"); progress = $("option[value='in progress']"); ordered = $("option[value='ordered']"); unordered = $("option[value='unordered']"); completed = $("option[value='completed']"); cancelled = $("option[value='cancelled']"); //declaring variables priority changes reg = $('input[value="ctl00"]'); high = $('input[value="ctl01"]'); ...

c++ - Should I listen on different ports, or the same port? -

i'm writing c++ application mymasterapp (windows & mac) listening bunch of information coming different computers , applications. (osc via udp) i.e. mymasterapp listening tracking data coming number of tracker applications (which may or may not running on same computer, on same wired network). it's listening orientation data coming number of other applications (running on mobile devices, on same wifi). apps sending @ 30hz. so: /tracker/position1/[f] [f] [f] /tracker/position2/[f] [f] [f] /tracker/position3/[f] [f] [f] /mobile/orientation1/[f] [f] [f] [f] /mobile/orientation2/[f] [f] [f] [f] /mobile/orientation3/[f] [f] [f] [f] i'm wondering whether there difference (in network performance, collisions etc) if: mymasterapp should listen messages on port 8000, , tracker apps, , mobile apps send port 8000 vs mymaster listens to tracker messages on port 8000, , mobile messages on port 9000. both seem work fine, i'm wondering if there perfor...

Sharepoint error logging by the system -

i have worked on php (lamp) , have started working on sharepoint. in case of php errors captured , shown in apache error log in case of sharepoint have use try , catch block , use code shown below capture error. working fine me. no issues it. downside - have vigilant enough make sure put try catch every possible place. i want php, i.e. log things automatically. please help. microsoft.sharepoint.spsecurity.runwithelevatedprivileges(delegate() { spdiagnosticsservice diagsvc = spdiagnosticsservice.local; spdiagnosticscategory cat = diagsvc.areas["sharepoint foundation"].categories["unknown"]; string format = "test trace logging gggg category {0} in area {1}"; diagsvc.writetrace(1, cat, traceseverity.medium, format, cat.name, cat.area.name); }); i'm afraid ahve deal errors yourself. sharepoint implements own logs things...