Search Results

Search found 31 results on 2 pages for 'botem bao'.

Page 1/2 | 1 2  | Next Page >

  • ???? Oracle11g ????????? No.2 - v$database.CURRENT_SCN

    - by Todd Bao
    «????Oracle 11g ???????»???????????,?11.2.0.3.0?????: select current_scn from v$database union all select current_scn from v$database; ??????????SCN,??????11.2.0.1.0???????????SCN?????? ??,????11.2.0.1.0????,11.2.0.3.0????X$KCCDI(V$DATABASE?????,??CURRENT_SCN??)??,?????????SCN? ----------------------------------------------------| Id  | Operation            | Name               |----------------------------------------------------|   0 | SELECT STATEMENT     |                    ||   1 |  MERGE JOIN CARTESIAN|                    ||*  2 |   FIXED TABLE FULL   | X$KCCDI            ||   3 |   BUFFER SORT        |                    ||   4 |    VIEW              | VW_JF_SET$6E0AEE5B ||   5 |     UNION-ALL        |                    ||   6 |      FIXED TABLE FULL| X$KCCDI2           ||   7 |      FIXED TABLE FULL| X$KCCDI2           |---------------------------------------------------- ??????11.2.0.3.0???????SQL??v$database????current_scn????????:???????X$KCCDI???dicur_scn(current_scn)??????? a. ???:????union all,???????,??????????X$KCCDI2(V$DATABASE??????)?VIEW????,??X$KCCDI?X$KCCDI2????,???X$KCCDI??,??: SYS@fmw//Scripts> run  1  select current_scn from v$database  2  union all select current_scn from v$database  3  union all select current_scn from v$database  4* union all select current_scn from v$databaseCURRENT_SCN-----------    5074384    5074385    5074385    50743854 rows selected. ??,X$KCCDI?????????,??????????SCN??????SCN????????“?”SCN? b. ???:???????,??: SYS@fmw//Scripts> run  1  select current_scn,status from v$database,v$instance  2  union all  3* select current_scn,status from v$database,v$instanceCURRENT_SCN + STATUS----------- + ------------------------    5075463 + OPEN    5075464 + OPEN2 rows selected. c. ???:?????????: SYS@fmw//Scripts> run  1* select a.current_scn,b.current_scn from v$database a,v$database bCURRENT_SCN + CURRENT_SCN----------- + -----------    5078328 +     50783291 row selected. ????UNION ALL?????? d. ??,???X$KCCDI??????????????????“??”??=D,????????X$?????????$???,???????,????V$DATABASE?????????????????: SYS@fmw//Scripts> run  1  select dicur_scn from x$kccdi  2* union all select dicur_scn from x$kccdiDICUR_SCN--------------------------------508218350821842 rows selected. SYS@fmw//Scripts> run  1* select a.dicur_scn,b.dicur_scn from x$kccdi a,x$kccdi bDICUR_SCN                        + DICUR_SCN-------------------------------- + --------------------------------5082913                          + 50829141 row selected. ??? Todd Bao ??,???????????,?????????SCN,????V$DATABASE.CURRENT_SCN?,???????“next scn”? ×??,???demo????11.2.0.3.???

    Read the article

  • ???Past Image(pi)

    - by todd.bao(at)oracle.com
    Past Image???RAC??????????,????????????????????????????????,Past Image??????????,?????????????????,?????????????????,??????????????(pi)?????????????????Past Image,????????????:HR.EMPLOYEES??100????101?????5????88???????????????,???????????# ??1: ?????????SYS@RAC1//scripts> select inst_id,status from gv$bh where file#=5 and block#=88;no rows selected# ??1???(???Steve King, ????24000????)SYS@RAC1//scripts> update hr.employees set salary=1 where employee_id=100;1 row updated.# ??2: ????1??xcur????????????,?????????SYS@RAC1//scripts> select inst_id,dirty,status from gv$bh where file#=5 and  block#=88;   INST_ID + D + STATUS---------- + - + -------         1 + Y + xcur1 row selected.# ??2???SYS@RAC2//scripts> update hr.employees set salary=2 where employee_id=101;1 row updated.# ??3: ????2?,?????1??pi??Past Image,???????????????????????SYS@RAC1//scripts> select inst_id,dirty,status from gv$bh where file#=5 and  block#=88;   INST_ID + D + STATUS---------- + - + -------         1 + Y + pi         2 + Y + xcur2 rows selected.# ??1???SYS@RAC1//scripts> update hr.employees set salary=3 where employee_id=100;1 row updated.# ??4: ????1?,?????2???1???????2???????1???????SYS@RAC1//scripts> select inst_id,dirty,status from gv$bh where file#=5 and  block#=88;   INST_ID + D + STATUS---------- + - + -------         1 + Y + pi         1 + Y + xcur         2 + Y + pi3 rows selected.# ??2????SYS@RAC2//scripts> update hr.employees set salary=4 where employee_id=101;1 row updated.# ??5: ????2?,??????????????,DBWR??,??????,??(pi)?????????????(cr)??????????????????????????SYS@RAC1//scripts> select inst_id,dirty,status from gv$bh where file#=5 and  block#=88;   INST_ID + D + STATUS---------- + - + -------         1 + N + cr         1 + N + cr         2 + Y + xcur3 rows selected.# ?????1???SYS@RAC1//scripts> update hr.employees set salary=5 where employee_id=100;1 row updated.# ??6: ????1?,?????2????????????????,?????????SYS@RAC1//scripts> select inst_id,dirty,status from gv$bh where file#=5 and  block#=88;   INST_ID + D + STATUS---------- + - + -------         1 + Y + xcur         1 + N + cr         1 + N + cr         2 + Y + pi4 rows selected.# ??2???SYS@RAC2//scripts> update hr.employees set salary=6 where employee_id=101;1 row updated.# ??7: ????2?,?????1?2????1???????2?????????????4,????????????????SYS@RAC1//scripts> select inst_id,dirty,status from gv$bh where file#=5 and  block#=88;   INST_ID + D + STATUS---------- + - + -------         1 + Y + pi         2 + Y + pi         2 + Y + xcur3 rows selected.# ??1???SYS@RAC1//scripts> update hr.employees set salary=7 where employee_id=100;1 row updated.# ??8: ????1?,?????2?1????2???????1????????????2????????????????????????????????????(????????)????SYS@RAC1//scripts> select inst_id,dirty,status from gv$bh where file#=5 and  block#=88;   INST_ID + D + STATUS---------- + - + -------         1 + Y + pi         1 + Y + xcur         2 + Y + pi         2 + N + cr4 rows selected.??????????, ?xcur??????????:??????xcur????pi?????pi?(?????)???cr?,???cr?????,pi????????????????????????????:?????????????A?B?A:SYS@RAC1//scripts> run  1  begin  2  for i in 1..100000 loop  3  update hr.employees set salary=i where employee_id=100;  4  end loop;  5* end;B:SYS@RAC2//scripts> run  1  begin  2  for i in 1..100000 loop  3  update hr.employees set salary=i where employee_id=101;  4  end loop;  5* end;?????????,???5???88?????buffer cache???????:SYS@RAC2//scripts> select count(*) from gv$bh where file#=5 and block#=88;  COUNT(*)----------       4121 row selected.??409?????????(cur):SYS@RAC2//scripts> select count(*) from gv$bh where file#=5 and block#=88 where status='cr';  COUNT(*)----------       4091 row selected.1????????(xcur):SYS@RAC2//scripts> select count(*) from gv$bh where file#=5 and block#=88 where status='xcur';  COUNT(*)----------           11 row selected.??...2??????--????(pi)??????????SYS@RAC1//scripts> select inst_id,dirty,status from gv$bh where file#=5 and block#=88 and status='pi';   INST_ID + D + STATUS---------- + - + -------         1 + Y + pi         2 + Y + pi2 rows selected.????,???RAC??????????????(cr)?,????????????????????????xcur?pi??cr??????pi?????? ?????????,???????????pi???cr?,?????????cr???,???xcur???????,pi??????xcur?,[email protected]

    Read the article

  • Silverlight Cream for March 08, 2010 -- #809

    - by Dave Campbell
    In this Issue: Michael Washington, Tim Greenfield, Bobby Diaz(-2-), Glenn Block(-2-), Nikhil Kothari, Jianqiang Bao(-2-), and Christopher Bennage. Shoutouts: Adam Kinney announced a Big update for the Project Rosetta site today Arpit Gupta has opened a new blog with a great logo: I think therefore I am dangerous :) From SilverlightCream.com: DotNetNuke Silverlight Traffic Module If it's DNN and Silverlight, it has to be my buddy Michael Washington :) ... Michael has combined those stunning gauges you've seen with website traffic... just too cool!... grab the code and display yours too! Cool demonstration of Silverlight VideoBrush This is a no-code post by Tim Greenfield, but I like the UX on this Jigsaw Puzzle page... and you can make your own. Introducing the Earthquake Locator – A Bing Maps Silverlight Application, part 1 Bobby Diaz has an informative post up on combining earthquake data with BingMaps in Silverlight 3... check it out, the grab the recently posted Live Demo and Source Code Adding Volcanos and Options - Earthquake Locator, part 2 Bobby Diaz also added volcanic activity to his earthquake BinMaps app, and updated the downloadable code and live demo. Building Hello MEF – Part IV – DeploymentCatalog Glenn Block posted a pair of MEF posts yesterday... made me think I missed one :) .. the first one is about the DeploymentCatalog. Note he is going to be using the CodePlex bits in his posts. Building HelloMEF – Part V – Refactoring to ViewModel Glenn Block's part V is about MEF and MVVM -- no, really! ... he is refactoring MVVM into the app with a nod to Josh Smith and Laurent Bugnion... get your head around this... The Case for ViewModel Nikhil Kothari has a post up about the ViewModel, and how it facilitates designer/developer workflow, jumpstarts development, improves scaling, and makes asynch programming development simpler MMORPG programming in Silverlight Tutorial (12)Map Instance (Part I) Jianqiang Bao has part 12 of his MMORPG game up... this one is showing how to deal with obstuctions on maps. MMORPG programming in Silverlight Tutorial (13)Perfect moving mechanism Jianqiang Bao also has part 13 up, and this second one is about sprite movement around the obstructions. 1 Simple Step for Commanding in Silverlight Christopher Bennage blogged about Commanding in Silverlight, he begins with a blog post about commands in Silverlight 4 then goes on to demonstrate the Caliburn way of doing commanding. Stay in the 'Light! Twitter SilverlightNews | Twitter WynApse | WynApse.com | Tagged Posts | SilverlightCream Join me @ SilverlightCream | Phoenix Silverlight User Group Technorati Tags: Silverlight    Silverlight 3    Silverlight 4    MIX10

    Read the article

  • JDK7?????

    - by Todd Bao
    ??JSR 334,JDK 7?????????????,???:1. switch????String????:    public static void switchString(String s){        switch (s){        case "db": ...        case "wls": ...        case "idm": ...        case "soa": ...        case "fa": ...        default: ...        }    }2. ?????????? - "0b"???"_"???,?????????? a. ???????????, 0b: ????????????:        byte b1 = 0b00100001;     // New        byte b2 = 0x21;        // Old        byte b3 = 33;        // Old b. ??????????????,?????,????????????:    long phone_nbr = 021_1111_2222;3. ???????????? - "?? new",????????:        ArrayList<String> al1 = new ArrayList<String>();    // Old        ArrayList<String> al2 = new ArrayList<>();        // New4. ????reflect?????????? - ReflectOperationException,????:    ClassNotFoundException,     IllegalAccessException,     InstantiationException,     InvocationTargetException,     NoSuchFieldException,     NoSuchMethodException5. catch????????,?????????,????????:    try{        // code    }    catch (SQLException | IOException ex) {        // ...    }6. ?????? - ??????????,??????????style:    public void test() throws NoSuchMethodException, NoSuchFieldException{    // ??        try{            // code        }        catch (RelectiveOperationException ex){    // ??            throws ex;        }    }7. ???try()?? - Try with Resources,?????????????(???????????java.lang.AutoCloseable??),???????try?????"("??"{":    try(BufferedReader br = new BufferedReader(new FileReader("/home/oracle/temp.txt"))){        ... br.readLine() ...    }try-with-resources?????catch,??????????catch???????Todd

    Read the article

  • SQL??“ALL”,????

    - by Todd Bao
    ALL????????????,>ALL?>=ALL?<ALL?<=ALL?=ALL?!=ALL???????????????????WHERE????TRUE?????????“=ALL”?????:select employee_id,last_name,department_id  from hr.employees   where department_id =ALL (select department_id from hr.employees where salary > 16000);EMPLOYEE_ID + LAST_NAME         + DEPARTMENT_ID----------- + ------------------------- + -------------    100 + King            +         90    101 + Kochhar            +         90    102 + De Haan            +         903 rows selected.??????????SALARY??16000????????????????????(???90),???????????????????????,????????????department_id???,????????????,???16000???8000:select employee_id,last_name   from hr.employees   where department_id =ALL (select department_id from hr.employees where salary > 8000);no rows selected????,ALL???????????????????WHERE????TURE,??????,??????salary > 77777:select employee_id,last_name   from hr.employees   where department_id =ALL (select department_id from hr.employees where salary > 77777)/?????????????77777??,??????“where department_id =ALL (???)”??TRUE,?????????????:EMPLOYEE_ID + LAST_NAME----------- + -------------------------    198 + OConnell    199 + Grant    ...   .....    196 + Walsh    197 + Feeney107 rows selected.?????????????>ALL?<ALL?>=ALL?<=ALL?!=ALL??,??????????????,???????“?”??????????????????,?“?”?????????????????????????????:select * from hr.employees where department_id >=ALL (null)/Todd

    Read the article

  • ????showPopupBehavior??region??popup??

    - by Todd Bao
    ???????ADF??????????????:?????????showPopupBehavior???jsp?,???????popup????jsp??region(??Bounded Taskflow)????jsff?????????showPopupBehavior?poupId???????????????<af:region value="#{bindings.inner1.regionModel}" id="r1"/><af:commandButton text="Pop UP" id="cb1">  <af:showPopupBehavior popupId="r1:p1"/></af:commandButton>?????popupId - r1:p1 - ?????id?r1?region????id?p1?popup???jsff?id??????????????,expression builder???????,design time checker????popupId????,?????????????????? Todd

    Read the article

  • ???????????????

    - by Todd Bao
    ?????????,???????????????????,??????????,???????,??????,?????????????: SYS@fmw//Scripts> @showfkparent hr employees---------------|             ||DEPARTMENT_ID| +>-->HR.DEPARTMENTS.DEPARTMENT_ID|             ||JOB_ID       | +>-->HR.JOBS.JOB_ID|             ||MANAGER_ID   | +>-->HR.EMPLOYEES.EMPLOYEE_ID|             |--------------- SYS@fmw//Scripts> @showfkparent sh sales------------|          ||CHANNEL_ID| +>-->SH.CHANNELS.CHANNEL_ID|          ||CUST_ID   | +>-->SH.CUSTOMERS.CUST_ID|          ||PROD_ID   | +>-->SH.PRODUCTS.PROD_ID|          ||PROMO_ID  | +>-->SH.PROMOTIONS.PROMO_ID|          ||TIME_ID   | +>-->SH.TIMES.TIME_ID|          |------------ ????????? ??? 30-08-2012 set echo offset verify offset serveroutput ondefine table_owner='&1'define table_name='&2'declare        type info_typ is record (ct varchar2(30),cc varchar2(30),po varchar2(30),pt varchar2(30),pc varchar2(30));        type info_tab_typ is table of info_typ index by pls_integer;        info_tab info_tab_typ;        max_col_length number := 0;beginwith        cons_child as (select                        owner,constraint_name,table_name,                        r_owner,r_constraint_name                from dba_constraints                where                        constraint_type='R' and                        owner=upper('&table_owner') and                        table_name=upper('&table_name')),        cons_parent as (select owner,constraint_name,table_name                from dba_constraints                where                        (owner,constraint_name) in                        (select r_owner,r_constraint_name from cons_child))select        child.table_name child_table_name,        child.column_name child_column_name,        parent.owner parent_owner,        parent.table_name parent_table_name,        parent.column_name parent_column_name        bulk collect into info_tabfrom        cons_child cc,        cons_parent cp,        dba_cons_columns parent,        dba_cons_columns childwhere        cc.owner = child.owner and        cc.constraint_name = child.constraint_name and        cp.owner = parent.owner and        cp.constraint_name = parent.constraint_name and        cc.r_owner = cp.owner and        cc.r_constraint_name = cp.constraint_name and        parent.position = child.positionorder by 2;if (info_tab is not null and info_tab.count >0) then        for i in 1..info_tab.count loop                if length(info_tab(i).cc) > max_col_length then                        max_col_length := length(info_tab(i).cc);                end if;        end loop;        dbms_output.put_line(rpad('-',max_col_length+2,'-'));                dbms_output.put_line(' '||'|'||rpad(' ',max_col_length,' ')||'|');        for i in 1..info_tab.count loop                dbms_output.put('|'||rpad(info_tab(i).cc,max_col_length,' ')||'|');                dbms_output.put_line(' +>-->'||info_tab(i).po||'.'||info_tab(i).pt||'.'||info_tab(i).pc);                dbms_output.put_line('|'||rpad(' ',max_col_length,' ')||'|');        end loop;        dbms_output.put_line(rpad('-',max_col_length+2,'-'));else        dbms_output.put_line('### No foreign key defined on this table! ###');end if;end;/undefine table_ownerundefine table_nameset serveroutput off Todd

    Read the article

  • ?????3:????“??”

    - by Todd Bao
    ?????SQL???????... =D select c from(select * from(select 'oracle' cc, level no from dual connect by level <= length('oracle'))model return updated rowsdimension by (no)measures (cc c, no n)rules (   c[any] = substr(c[cv()],n[cv()],1)))/ ????itpub?????????oracle????????,???????,?????????“???”,????????????????????????????????????=D ??? Todd ????:http://www.itpub.net/forum.php?mod=viewthread&action=printable&tid=1253982 Todd

    Read the article

  • ASP NET Custom Routing

    - by Botem Bao
    I have following patterns /invitation/mission/busstop -- return the list of busstops /invitation/mission/busstop/id -- return a specific busstop /invitation/mission/driver -- return the list of drivers /invitation/mission/driver/id -- return a specific driver /invitation/mission/driver/city/model/limit -- query driver accoring to city, model and age limit ... /invitation/questionair -- return the list of questionairs /invitation/questionair/id -- return a specific questionair /invitation/questionair/create -- create a new questionair /invitation/questionair/update/id -- update a questionair ... I expect the 'invitation' to be controller, and the rest to be action. Each of the above url should corresponds to a dedicated view page. Can anyone help me to design the routes? ===================================================================== I update the patterns, and add my expectation at the end of each url. Any suggest on the url patterns?

    Read the article

  • I have a Windows Server 2008 R2 box with IIS 7.5

    - by bao
    In Event viewer i have found this: The World Wide Web Publishing Service service entered the stopped state. - - 7036 0 4 0 0 0x8080000000000000 6913 System w2k8x64 - World Wide Web Publishing Service stopped 570033005300560043002F0031000000 How to determine, was server stopped by clicking "Stop" in IIS manager or it stopped itself because of some other reasons? When the stop event occured I was logged in via RDP but I don't remember and clicks in IIS Manager...:( there are no error messages in event viewer

    Read the article

  • ORA-12705 with OracleXE & Windows 7 & GlassFish

    - by bao
    I hate this problem... pls help! I have: GlassFish v3 (build 74.2) Windows 7 Pro english Oracle XE 10.2.0 settings: SQL select * from nls_database_parameters; PARAMETER VALUE NLS_LANGUAGE AMERICAN NLS_TERRITORY AMERICA NLS_CURRENCY $ NLS_ISO_CURRENCY AMERICA NLS_NUMERIC_CHARACTERS ., NLS_CHARACTERSET WE8MSWIN1252 NLS_CALENDAR GREGORIAN NLS_DATE_FORMAT DD-MON-RR NLS_DATE_LANGUAGE AMERICAN NLS_SORT BINARY NLS_TIME_FORMAT HH.MI.SSXFF AM PARAMETER VALUE NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR NLS_DUAL_CURRENCY $ NLS_COMP BINARY NLS_LENGTH_SEMANTICS BYTE NLS_NCHAR_CONV_EXCP FALSE NLS_NCHAR_CHARACTERSET AL16UTF16 NLS_RDBMS_VERSION 10.2.0.1.0 20 rows selected. SQL HOST ECHO %NLS_LANG% AMERICAN_AMERICA.WE8MSWIN1252 NLS_LANG in registry is AMERICAN_AMERICA.WE8MSWIN1252 ORACLE_HOME in registry is C:\oraclexe\app\oracle\product\10.2.0\server I am creating Connection pool in Glassfish admin web GUI, trying to ping.. This error in log: [#|2010-05-15T23:19:26.958+0400|WARNING|glassfishv3.0|javax.enterprise.resource.resourceadapter.com.sun.enterprise.connectors.service|_ThreadID=29;_ThreadName=Thread-1;|RAR8054: Exception while creating an unpooled [test] connection for pool [ phut ], Connection could not be allocated because: ORA-00604: error occurred at recursive SQL level 1 ORA-12705: Cannot access NLS data files or invalid environment specified |#] HOW TO FIX??

    Read the article

  • how to limit network bandwidth for testing (win7, virtualbox)

    - by bao
    Hi! I develop ASP.NET application on Windows 7 machine (IIS 7.5). I need to limit network bandwidth to test my AJAX GUI. What kind of software could you recommend for those cases: a) I deploy my app to the remote IIS box and try to limit bandwidth of my network connection in Windows 7. b) I deploy my app to the IIS installed on Win7 and try to test my app from Virtualbox machine via virtual network. So, any opinions?

    Read the article

  • Android 2.0 contact groups manipulation

    - by Bao Le
    I would manipulate the contact groups in Android 2.O. My code is following: To get a list of group (with id and title): final String[] GROUP_PROJECTION = new String[] { ContactsContract.Groups._ID, ContactsContract.Groups.TITLE }; Cursor cursor = ctx.managedQuery(ContactsContract.Groups.CONTENT_URI, GROUP_PROJECTION, null, null, ContactsContract.Groups.TITLE + " ASC"); Later, on an ListView, I select a group (onClick event) and read all contacts belong to this selected group by following code: String where = ContactsContract.CommonDataKinds.GroupMembership.GROUP_ROW_ID + "=" + groupid + " AND " + ContactsContract.CommonDataKinds.GroupMembership.MIMETYPE + "='" + ContactsContract.CommonDataKinds.GroupMembership.CONTENT_ITEM_TYPE + "'"; Problem: ContactsContract.Groups._ID in the first query does not match with the ContactsContract.CommonDataKinds.GroupMembership.GROUP_ROW_ID in the second query. Any solution/suggestion? Thanks

    Read the article

  • MongoDB vs. Redis vs. Cassandra for a fast-write, temporary row storage solution

    - by Mark Bao
    Hi there, I'm building a system that tracks and verifies ad impressions and clicks. This means that there are a lot of insert commands (about 90/second average, peaking at 250) and some read operations, but the focus is on performance and making it blazing-fast. The system is currently on MongoDB, but I've been introduced to Cassandra and Redis since then. Would it be a good idea to go to one of these two solutions, rather than stay on MongoDB? Why or why not? Thank you

    Read the article

  • How to find files according RegEx in C#

    - by bao
    I need to get list of files on some drive with paths that matches specific pattern, for example FA\d\d\d\d.xml where \d is digit (0,1,2..9). So files can have names like FA5423.xml. What is the most efficient name to do this?

    Read the article

  • Print a JavaScript array to HTML, square brackets and quotation marks intact

    - by Mark Gia Bao Nguyen
    I'd like to set the attribute of an input form with an array of values (to use for autocomplete search). I have a JS array that looks a little something like this: var suggestions = ["value1", "value2", "value3"]; Using jQuery, I did this: $("#search-input").attr("data-source", suggestions); Desired output: <input type='search' data-source='["value1", "value2", "value3"]' /> Actual output: <input type='search' data-source='value1, value2, value3' /> This breaks the autocomplete as it requires an array (or at least something that looks like a JavaScript array).

    Read the article

  • Find the element with the most "neighbors" in a sequence

    - by Bao An
    Assume that we have a sequence S with n elements <x1,x2,...,xn>. A pair of elements xi,xj are considered neighbors if |xi-xj|<d, with d a given distance between two neighbors. So how can find out the element that has most neighbors in the sequence? (A simply way is sorting the sequence and then calculating number of each element but it's time complexity is quite large): O(nlogn) May you please help me find a better way to reduce time complexity?

    Read the article

  • Android: how to detect a private number programmatically

    - by Bao Le
    I use BroadcastReceiver to intercept incoming call on Android phone as below tm = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE); Bundle bundle = intent.getExtras(); String number = bundle.getString(TelephonyManager.EXTRA_INCOMING_NUMBER); In the "private number" case, I tested on two devices, it shows the number as -1 on HTC Wildfire and -2 on Galaxy S. I checked the android.telephony.PhoneNumberUtils but it could't help me. Is there a function or a generic way to detect a private number on Android phone? Thanks

    Read the article

  • How to query the video ram size of a ATI card on Linux?

    - by Patrick Bao
    I want to know the physical video ram size in my application. I can get the same information of Nvidia card by using "nvidia-settings -q -t VideoRam". I can use amdcccle to find this information, but it's an GUI app, so can't be used in my application. I wonder if there is a way to get this by command, function, or config file? I'm using RHEL 5.4.

    Read the article

  • Which encoding (code page) is used for file names in ZIP archive under Mac OS x 10.6

    - by bao
    I have a zip library SharpZipLib which intended to work with ZIP archives using C#. It has parameter ICSharpCode.SharpZipLib.Zip.ZipConstants.DefaultCodePage which specifies encoding of file names in zip archive. I know that in Windows and in OSX different encodings are used to store file names. 1) Which encodings (code pages) are used in both? 2) How to determine programmatically which encoding is used? When I open in Win7 zip file packed under MacOS X, I see files with bad names (originally - cyrillic) and folder called __MACOSX, so I can say zip was prepared on Mac box. Any other way? What about other UNIX like systems?

    Read the article

  • How to get Host OS (operating system) parameter of ZIP archive in C#

    - by bao
    Look. I have ZIP archives prepared in different os'es: mac, linux, windows. In windows file names encoded in DOS CP866, mac & linux in UTF-8. I need to know (in code) in which os zip file was prepared to decode file names correctly. There is a Host OS paramterer in "Central directory structure" of zip file (look http://www.fileformat.info/format/zip/corion.htm ). How to get 0005h 1 byte Host OS parameter in C#?

    Read the article

  • How do I return a variable from $.post() in jQuery? Closure variable?

    - by James Bao
    I am having trouble passing data retrieved from a $.post() function to use in other places in my code. I want to save the data as a variable and use it outside of the post() function. This is my code: var last_update = function() { $.post('/--/feed', {func:'latest', who:$.defaults.login}, function($j){ _j = JSON.parse($j); alert(_j.text); // This one works }); } alert(_j.text); // This one doesn't }; last_update(); //run the function Please help!

    Read the article

  • Passing data between Castle Windsor's Interceptors

    - by Nhím H? Báo
    I'm adopting Castle Windsor for my WCF project and feel really amazed about this. However, I'm having a scenario that I don't really know if Castle Windsor supports. For example I have the following chained Interceptors Interceptor 1 > Interceptor 2 > Interceptor 3 > Interceptor 4 > Real method Interceptor 1 returns some data and I want that to be available in Interceptor 2 Interceptor 2 in turn does it work and returns the data that I want to make avaialbe in the 3,4, interceptor. The real case scenario is that we're having a WCF service, Interceptor 1 will parse the request header into a Header object(username, password, etc.). The latter interceptors and real method will ultilize this Header object. I know that I can use Session variable to transport data, but is it a built-in, more elegant, more reliable way to handle this?

    Read the article

1 2  | Next Page >