Posts

datareader - oracle reader returning System.Data.OracleClient.OracleCommand as value -

i'm stumped thing. i'm using simple following code: con.connectionstring = @"data source=(description=(address_list=(address=(protocol=tcp)(host=myhost)(port=1521)))(connect_data=(server=dedicated)(service_name=myservice)));user id=myuser;password=mypassword"; con.open(); oraclecommand command = con.createcommand(); command.commandtext = "select srvid mytable used=0 , rownum = 1"; oracledatareader reader = command.executereader(); while (reader.read()) { readercheck = reader.getstring(0); } for whatever reason, reader.getstring(0) won't work because value it's trying access object of type system.data.oracleclient.oraclecommand. if use reader.tostring() actualy returns "system.data.oracleclient.oraclecommand" string! help appreciated!! i found while searching solution same problem. getstring(0) won't work because you...

javascript - Handle Pop-Up While Navigating with IE -

i have excel vba macro opens ie, navigates medicare website, logs me in, compares claims listed on website in workbook alerts me differences it during log-in step have problem, i've reproduced portion of code below. .click line executed pop-up window appears asking user click ok button in order proceed. macro execution suspended until manually click ok button on pop-up. the source code behind http://www.mymedicare.gov web page has information relative pop-up, haven't been able figure out how use can programmatically click pop-up ok button. any in terms of figuring out how programmatically click pop-up's ok button appreciated. note: purpose of question, user id , password can used. if handle pop-up you'll passed page says incorrect user id / password. that indicate you've been successful in handling pop-up. sub medicare_claims()' ' update status bar application.statusbar = "running medicare claims subroutine...

c# - Need some help in getting the CPU Frequency -

i'm trying make c# software reads information cpu , displays them user (just cpu-z). current problem i've failed find way display cpu frequency. at first tried easy way using win32_processor class . proved efficient, except if cpu overclocked (or underclocked). then, discovered registry contain @ hklm\hardware\description\system\centralprocessor\0 "standard" clock of cpu (even if overclocked). problem in modern cpus, core multiplier decreasing when cpu not need it's full power, cpu frequency changing, value in registry remains same. my next step trying use rdtsc calculate cpu frequency. used c++ because can embed in c# project if method working. found next code @ http://www.codeproject.com/articles/7340/get-the-processor-speed-in-two-simple-ways problem same: program gives me maximum frequency (like in registry value, 1-2 mhz difference) , looks loads cpu more should (i had cpu load spikes). #include "stdafx.h" #include <windows.h>...

needs some help on using font-face on mobile webs -

i have been seeking way implement external font in mobile webpages , came across website. http://www.google.com/fonts/earlyaccess after testings, have found out android web browser downloads 3 "woff" fonts on 1m each including: regular, bold, , extrabold. although after first download caches, still handle since downloads fonts in beginning. i needing korean font. (some font files includ many different languages) there api select korean font , download specific language need? i came across project... https://code.google.com/p/sfntly/ if has dealt similar or knows it, appreciate help. thank you! i don't know if understand problem fonts on web try converter: http://www.fontsquirrel.com/tools/webfont-generator

ios - Restkit - NSArray property is always null -

i'm beginner restkit (i have ios experience) , i'm having problems nsarray not being populated rkmappingresult. populates in actual 'block' if call access in viewdidload(), prints out null. could please advise or provide tips/links articles? thanks lot! here code - -(void) loaddata { rkobjectmapping *mapping = [rkobjectmapping mappingforclass:[venue class]]; [mapping addattributemappingsfromdictionary:@{ @"name": @"name", @"location.address" : @"address", @"location.city" : @"city"}]; nsstring *urlstring = [nsstring stringwithformat:@"https://api.foursquare.com/v2/venues/search?ll=55.903324,-3.171383&categoryid=4bf58dd8d48988d18f941735&client_id=%s&client_secret=%s&v=20130717", kclientid, kclientsecret]; nsurl *baseurl = [nsurl urlwithstring:urlstring]; rkresponsedescriptor *responsedescriptor = [rkresponsedescriptor responsedescriptorwithmapp...

javascript - Integrate POST method into dynamically created form -

i'm creating gui form insert object div apply classes animate across screen. way have set up, whenever select class , apply , hit submit button, seems refreshing whole page. know has using post method i'm not sure how. here js: ////////////////////////////////////////////////////////////////////////////////////////////////////////add sprite var spriteid = 1; $(".add_sprite").click(function() { $("<div />", { "class":"sprite_container", id:"sprite_container"+spriteid }) .append($("<div />", { "class":"sprite" , id:"sprite"+spriteid })) .appendto("#divmain"); spriteid++; }); ////////////////////////////////////////////////////////////////////////////////////////////////////////add sprite controls var controlsid = 1; $(".add_sprite").click(function() { $("<form />", { "class":"sprite_controls", id:...

c++ - Correct way to declare/define custom cout-like object -

i created own std::cout -like object writes both std::cout , log file. i'm defining in header file, i'm getting unused variable warnings. header file <mylib/log.h> static lout { }; static lout lo; template<typename t> inline lout& operator<<(lout& mlout, const t& mvalue) { std::string str{tostr(mvalue)}; std::cout << str; getlogstream() << str; return mlout; } usage: #include <mylib/log.h> ... lo << "hello!" << std::endl; should lo static ? should lo extern ? kudos explaining correct way of declaring cout -like object , showing how main standard library implementations it. edit: cout -like object, mean global variable available after including corresponding header. std::cout declared follows: namespace std { extern ostream cout; } it regular global variable; can same thing yourself. put extern declaration of variable in header; define same variable ...