search for: my_str

Displaying 16 results from an estimated 16 matches for "my_str".

Did you mean: mm_str
2006 Dec 07
4
Removing a block of text within a string
When you first visit my site, you see a snippet (the first 75 words) of the most recent post. If it exceeds 75 words, a link will be appended to extend the post and read it in full. Now, my problem is when I post a code snippet, and I use "pre" tags to preserve its formatting, I don''t want that to show up on the snippet... only on the full version of the post. The reason is
2024 May 21
1
wrtiteBin in conjunction with seek : the position in the file is not good when writing
...n(bytes,"character")) print(my_number) # we are on position 6 pos <- seek(con_in,0,origin="current") print(paste0("pos = ",pos)) bytes = readBin(con=con_in, what="raw",n = 1) my_number <- as.numeric(readBin(bytes,"character")) print(my_number) my_string <- charToRaw(sprintf(paste('%',3,'s',sep=''),"AA")) writeBin(? my_string, con=con_in, useBytes = FALSE) writeBin(? my_string, con=con_in, useBytes = FALSE) close(con_in)
2015 Aug 05
2
[LLVMdev] Cc llvmdev: Re: llvm bpf debug info. Re: [RFC PATCH v4 3/3] bpf: Introduce function for outputing data to perf event
...Can you just define a function that aliases to intrinsic, >>> like we do for ld_abs/ld_ind ? >>> void bpf_store_half(void *skb, u64 off, u64 val) >>> asm("llvm.bpf.store.half"); >>> then no extra patches necessary. >>> >>>> struct my_str { >>>> int x; >>>> int y; >>>> }; >>>> struct my_str __str_my_str; >>>> >>>> struct my_str2 { >>>> int x; >>>> int y; >>>> int z; >>>>...
2015 Aug 06
2
[LLVMdev] Cc llvmdev: Re: llvm bpf debug info. Re: [RFC PATCH v4 3/3] bpf: Introduce function for outputing data to perf event
On Wed, Aug 05, 2015 at 04:28:13PM +0800, Wangnan (F) wrote: > > It doesn't work for me at first since in my llvm there's only > llvm.bpf.load.*. > > I think llvm.bpf.store.* belone to some patches you haven't posted yet? nope. only loads have special instructions ld_abs/ld_ind which are represented by these intrinsics. stores, so far, are done via single
2020 Jan 30
3
Question about ObjectSizeOffsetVisitor::visitGlobalVariable
.../16e42128c24f5df8a61cfd2e6cdf3bd3966db0c5 > . A reduced example might look something like this: > https://godbolt.org/z/r4G_g- > > At the C source level, static object size detection has to be similarly > conservative in the face of 'variable-length' structs like `struct > my_string { size_t size; char data[0]; };`, though I don't know how > relevant that is here. > > On Tue, Jan 28, 2020 at 11:41 PM Karl Rehm via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > >> In this function (used to check the size of a global) there is an initial >...
2019 Jan 25
0
[klibc:update-dash] [EXPAND] Propagate EXP_QPAT in subevalvar
...ubevalvar On Tue, Aug 28, 2012 at 01:27:24PM +0000, Todor Vlaev wrote: > > While playing around with parameter expansion I noticed that the > following didn't work in dash (dash 0.5.5.1-7.4ubuntu1) as compared > to bash even though I believe it should be POSIX-compliant: > > my_str=swan; last_char="${my_str#${my_str%?}}"; echo ${last_char} > > If the double quotes are removed, the last character is printed correctly. > > At a quick glance through the commits after the 0.5.5.1 release I saw > the following bug fix. Could it be related? > > 0d7d66...
2020 Mar 28
0
[klibc:update-dash] dash: [EXPAND] Propagate EXP_QPAT in subevalvar
...6bdea9c ] On Tue, Aug 28, 2012 at 01:27:24PM +0000, Todor Vlaev wrote: > > While playing around with parameter expansion I noticed that the > following didn't work in dash (dash 0.5.5.1-7.4ubuntu1) as compared > to bash even though I believe it should be POSIX-compliant: > > my_str=swan; last_char="${my_str#${my_str%?}}"; echo ${last_char} > > If the double quotes are removed, the last character is printed correctly. > > At a quick glance through the commits after the 0.5.5.1 release I saw > the following bug fix. Could it be related? > > 0d7d66...
2006 Jul 28
2
string replacement?
Hello, What is the best method to replace a substring within a string? I''m trying this: url.gsub(string_to_replace,replacement) but i get the following error: undefined method `rewrite'' for #<String:0x3711a58> -- Posted via http://www.ruby-forum.com/.
2012 Mar 26
1
normalization of multi-value string variable
Hi All, I need to normalize/scale string variable which represents interests of customers (e.g., 'cycling, rollerblading, swimming' etc). Does anybody know how to do this, I want then use it along with other numeric variables for SVM classification. Appreciate for any advice. -Alex [[alternative HTML version deleted]]
2020 Jan 29
2
Question about ObjectSizeOffsetVisitor::visitGlobalVariable
In this function (used to check the size of a global) there is an initial check for whether the initializer to this function is "definitive." My question is: why do we need this? How does the object's size change if a global's initializer is defined at link time? Thanks, Karl -------------- next part -------------- An HTML attachment was scrubbed... URL:
2024 May 21
1
wrtiteBin in conjunction with seek : the position in the file is not good when writing
...0,origin="current") That's strange. You started at offset 2 and read three bytes. You should be at offset 5 at this point. For me, seek() returns 5 here, not 6. > bytes = readBin(con=con_in, what="raw",n = 1) But after this, we should be on position 6. > writeBin(? my_string, con=con_in, useBytes = FALSE) It's described in help(seek) that R maintains two different pointers for reading and writing a file. You have been reading it, advancing the read pointer to 6, but the write pointer stayed at offset 0. Try seek(con_in, seek(con_in, 0, 'current', '...
2006 Oct 20
7
MVC and modules. Views telling models to behave
...a view could tell a model how to format it''s data for that particular view. Kind of like, the view is bestowing instant, and temporary knowledge on the model for the duration of the views run. It seemed to me that this would be more objecty than say a helper that formats a string format_my_string( my_string ) Instead, in my view. Lets assume I have a Building class that has a phone_number field At the top of my view then <% Building.include PhoneNumberFormat %> The PhoneNumberFormat module could overwrite the getter methods of phone_number, fax_number etc to provide me with so...
2006 Jun 27
0
Calling SOAP based Web Services over SSL
...vcstage.e2ma.net/emmaTestCalls.wsdl" soap = SOAP::WSDLDriverFactory.new(wsdl_url).create_rpc_driver result = soap.sayHello puts "The result from sayHello is:" + result result = soap.testStringParam("Hello from darden") puts "The result from testStringParam(string my_string) is:" + result ******************************************************************* 3) The "equivalent" ruby code in rails fails. The ruby on rails code looks like: ******************************************************************* def hello soap_client = SOAP::WSDLDriver...
2006 Sep 09
13
best way to add "created_by" entries to all tables???
Hi, I want to automate somewhat the addition of created_by/updated_by fields on my models (i.e. to include username). What''s the best/recommended way to do this? Would it be to: a) Find out how to extend the ActiveRecord::Base itself (I haven''t extended a class before yet) b) Use a plugin type approach where you have to add a tag manually to each model file which then
2006 Jul 20
6
replace_html + javascript
Hi all, This is my first post to the list, so I hope it gets through and I don''t do anything wrong :) Here''s the issue I''m having... I have an rjs that''s doing: page.replace_html ''myid'', :partial => ''my_partial'' And in my my_partial I have: <script type="text/javascript">
2015 Aug 18
3
[RFC PATCH 1/2] [clang]: Add AuxAttr support
...numeration type in Dwarf information. For example, by calling DI->EmitTypeAuxAttribute(type, "ID", 1234); We can get following information in dwarf: <1><3f>: Abbrev Number: 3 (DW_TAG_structure_type) <40> DW_AT_name : (indirect string, offset: 0xeb): my_str ... <2><47>: Abbrev Number: 4 (DW_TAG_member) <48> DW_AT_name : (indirect string, offset: 0xe3): x <4c> DW_AT_type : <0x6d> ... ... <2><5f>: Abbrev Number: 5 (DW_TAG_enumeration_type) <60> DW_AT_name...