PageRenderTime 528ms queryFilters 0ms Sphinxql 240ms app.CodeModel.GetByIds 11ms findMatchingLines 28ms GetByIds 39ms meta 0ms repositoryFilters 11ms languageFilters 18ms sourceFilters 7ms

4,916,907 results for 'foreach' (528 ms)

Source

Language

Repository

PFA.pm https://github.com/estrabd/perl-flat.git | Perl | 977 lines
47    my $CURR_NODE = undef;
48    foreach (@lines) {
49        # strip comments
117    my %tied   = ();
118    foreach my $node ($self->get_nodes()) {
119        my @trans = $self->get_lambda_transitions($node);
127    }
128    foreach my $t (keys(%tied)) {
129        push(@{$self->{_TIED}}, [@{$tied{$t}}]);
142    my $ok      = 0;
143    foreach my $tied ($self->get_tied()) {
144        my $allornone = 0;
144        my $allornone = 0;
145        foreach my $tn (@{$tied}) {
146            #if $tn is in @testset, increment $allornone
Chat.cs https://bitbucket.org/v_jli/jean06129jabbrnewest.git | C# | 1,181 lines
218            var mentionedUsers = new List<ChatUser>();
219            foreach (var userName in MentionExtractor.ExtractMentions(message.Content))
220            {
253
254            foreach (var user in mentionedUsers)
255            {
263
264            foreach (var client in mentionedUser.ConnectedClients)
265            {
309
310                foreach (var room in user.Rooms)
311                {
492
493            foreach (var room in user.Rooms)
494            {
ExportNagios.pm https://github.com/jvogt-swp/development.git | Perl | 1,723 lines
94
95    foreach my $row (@monitors){
96
134
135    foreach my $row (@collectors){
136
180    # iterate through all available ConfigClasses in database
181    foreach my $class (keys(%class_info)){
182        
245    my @host_tpl = &queryExecRead($sql, "Fetching monitor-specific host-templates", "all");
246    foreach (@host_tpl){push(@monitor_host_tpl,$_)}
247
274    my @srv_attrs1 = &queryExecRead($sql, "Fetching special monitor-specific options for services", "all");
275    foreach (@srv_attrs1){push(@monitor_srv_tpl_params,$_)}
276
ReadPermissionsOptimizationUtil.php https://bitbucket.org/pauk/zurmo_working | PHP | 1,042 lines
49            assert('is_bool($forcePhp)');
50            foreach (self::getMungableModelClassNames() as $modelClassName)
51            {
116                $models = RedBeanModel::getSubset(null, $i, $subset, null, null, $modelClassName);
117                foreach ($models as $model)
118                {
120                    $securableItemId = $model->getClassId('SecurableItem');
121                    foreach ($users as $user)
122                    {
130
131                    foreach ($groups as $group)
132                    {
137                            self::incrementCount($mungeTableName, $securableItemId, $group);
138                            foreach ($group->users as $user)
139                            {
Solution.cs https://github.com/stephenong/TickZoomPublic.git | C# | 1,247 lines
64			// Try all project's in the solution.
65			foreach (IProject project in Projects) {
66				if (project.IsFileInProject(fileName)) {
77				
78				foreach (ISolutionFolder solutionFolder in Folders) {
79					stack.Push(solutionFolder);
90						ISolutionFolderContainer currentContainer = (ISolutionFolderContainer)currentFolder;
91						foreach (ISolutionFolder subFolder in currentContainer.Folders) {
92							stack.Push(subFolder);
103				
104				foreach (ISolutionFolder solutionFolder in Folders) {
105					stack.Push(solutionFolder);
113						yield return currentContainer;
114						foreach (ISolutionFolder subFolder in currentContainer.Folders) {
115							stack.Push(subFolder);
suche_header_custom.tpl https://bitbucket.org/photografixgit/all4sps-git.git | Unknown | 535 lines
68      {foreach name=unterkats from=$oUnterKategorien_arr item=Unterkat}
69         <li class="p33 {if $smarty.foreach.unterkats.index%3==0 && $smarty.foreach.unterkats.index>0}clear{/if}">
70            <div class="category_wrapper clearall child {if $smarty.foreach.unterkats.index%3==0}first{else}last{/if}">
87                              <p>&bull; <a href="{$UnterUnterKat->cURL}">{$UnterUnterKat->cName}</a></p>
88                           {/foreach}
89                        {/if}
94         </li>
95      {/foreach}
96      </ul>
447      {if $smarty.foreach.topartikel.index < 3}
448         <li class="p309 {if $smarty.foreach.topartikel.iteration % 3 == 0}nomargin {/if}{if $smarty.foreach.topartikel.index % 3 == 0}clear{/if}">
449            <div class="pwrapper">
493      {if $smarty.foreach.artikel.index < 3}
494         <li class="p309 {if $smarty.foreach.artikel.iteration % 3 == 0}nomargin {/if}{if $smarty.foreach.artikel.index % 3 == 0}clear{/if}">
495            <div class="pwrapper">
product.tpl~ https://github.com/kabturek/dotfiles.git | Unknown | 470 lines
41{assign var='textFieldIndex' value=0}
42{foreach from=$customizationFields item='field' name='customizationFields'}
43{assign var='key' value='pictures_'|cat:$product->id|cat:'_'|cat:$field.id_customization_field}
44	customizationFields[{$smarty.foreach.customizationFields.index|intval}] = new Array();
45	customizationFields[{$smarty.foreach.customizationFields.index|intval}][0] = '{if $field.type|intval == 0}img{$imgIndex++}{else}textField{$textFieldIndex++}{/if}';
46	customizationFields[{$smarty.foreach.customizationFields.index|intval}][1] = {if $field.type|intval == 0 AND $pictures.$key}2{else}{$field.required|intval}{/if};
46	customizationFields[{$smarty.foreach.customizationFields.index|intval}][1] = {if $field.type|intval == 0 AND $pictures.$key}2{else}{$field.required|intval}{/if};
47{/foreach}
48
51var combinationImages = new Array();
52{foreach from=$combinationImages item='combination' key='combinationId' name='f_combinationImages'}
53combinationImages[{$combinationId}] = new Array();
382              {assign var='accessoryLink' value=$link->getProductLink($accessory.id_product, $accessory.link_rewrite, $accessory.category)}
383              <li class="ajax_block_product {if $smarty.foreach.accessories_list.first}first_item{elseif $smarty.foreach.accessories_list.last}last_item{else}item{/if} product_accessories_description">
384                <h5 class="align_center"><a href="{$accessoryLink|escape:'htmlall':'UTF-8'}">{$accessory.name|truncate:22:'...'|escape:'htmlall':'UTF-8'}</a></h5>
ServerManager.pm https://github.com/hirose31/mha4mysql-manager.git | Perl | 1,588 lines
165  $self->{unmanaged_slaves} = [];
166  foreach my $server (@servers) {
167
202  my $num_alive_binlog_servers = 0;
203  foreach my $server (@binlog_servers) {
204    unless ( $server->{logger} ) {
276  );
277  foreach my $target (@servers) {
278    unless ( $target->{logger} ) {
312
313  foreach my $target (@servers) {
314    next if ( $target->{dead} );
329  my $oldest_version;
330  foreach my $server (@servers) {
331    if ( $server->{oldest_major_version} ) {
beam_makeops https://github.com/notarf/otp.git | Perl | 1,728 lines
162
163    foreach (split('', $genop_types)) {
164	push(@tag_type, $_);
207
208    foreach my $tag (@tag_type) {
209	sanity("tag '$tag': primitive tags must be named with lowercase letters")
270	    &error("A macro must not start with a hyphen");
271	foreach (@flags) {
272	    /^-/ or &error("Flags for macros should start with a hyphen");
362
363    foreach $ref (@unnumbered_generic) {
364	my($name, $arity) = @$ref;
423    print "OpEntry opc[] = {\n";
424    foreach $key (sort keys %specific_op) {
425	$gen_to_spec{$key} = $spec_opnum;
javaInvokers.mvel https://github.com/mdproctor/drools.git | Unknown | 416 lines
46
47        @code{i0=0}@foreach{declr : declarations} @{declr.typeName} @{declr.identifier} = ( @{declr.boxedTypeName} ) previousDeclarations[@{i0}].@{declr.nativeReadMethod.name}( (org.drools.common.InternalWorkingMemory) workingMemory, ( (org.drools.common.InternalFactHandle) tuple.get( previousDeclarations[@{i0}] ) ).getObject() );
48        @code{i0++}
50        @if{readLocalsFromTuple}
51          @code{i0=0}@foreach{declr : localDeclarations} @{declr.typeName} @{declr.identifier} = ( @{declr.boxedTypeName} ) localDeclarations[@{i0}].@{declr.nativeReadMethod.name}( (org.drools.common.InternalWorkingMemory) workingMemory, ( (org.drools.common.InternalFactHandle) tuple.get( localDeclarations[@{i0}] ) ).getObject() );
52          @code{i0++}
54        @else{}
55          @code{i0=0}@foreach{declr : localDeclarations} @{declr.typeName} @{declr.identifier} = ( @{declr.boxedTypeName} ) localDeclarations[@{i0}].@{declr.nativeReadMethod.name}( (org.drools.common.InternalWorkingMemory) workingMemory, object );
56          @code{i0++}
58        @end{}
59        @foreach{type : globalTypes, identifier : globals} @{type} @{identifier} = ( @{type} ) workingMemory.getGlobal( "@{identifier}" );
60        @end{}
62        return @{ruleClassName}.@{methodName}(
63            @foreach{declr : declarations} @{declr.identifier}
64            @end{","}  @if{localDeclarations != empty && declarations != empty},@end{}
model.php https://github.com/tommyvdv/forkcms.git | PHP | 1,312 lines
58
59		foreach($types as $type)
60		{
70			// loop locale
71			foreach($locale as $i => $item)
72			{
115		// build labels
116		foreach($monthsLong as $key => $value) $json['loc']['MonthLong' . SpoonFilter::ucfirst($key)] = $value;
117		foreach($monthsShort as $key => $value) $json['loc']['MonthShort' . SpoonFilter::ucfirst($key)] = $value;
117		foreach($monthsShort as $key => $value) $json['loc']['MonthShort' . SpoonFilter::ucfirst($key)] = $value;
118		foreach($daysLong as $key => $value) $json['loc']['DayLong' . SpoonFilter::ucfirst($key)] = $value;
119		foreach($daysShort as $key => $value) $json['loc']['DayShort' . SpoonFilter::ucfirst($key)] = $value;
157		// loop applications
158		foreach($items as $application => $modules)
159		{
ooo.cpp https://github.com/stefanneumann/marss.git | C++ | 1,462 lines
54    // Initialize opcode maps
55    foreach (i, OP_MAX_OPCODE) {
56        W32 allowedfu = fuinfo[i].fu;
57        W32 allowedcl = 0;
58        foreach (cl, MAX_CLUSTERS) {
59            if (clusters[cl].fu_mask & allowedfu) setbit(allowedcl, cl);
64    // Initialize forward-at-cycle LUTs
65    foreach (srcc, MAX_CLUSTERS) {
66        foreach (destc, MAX_CLUSTERS) {
66        foreach (destc, MAX_CLUSTERS) {
67            foreach (lat, MAX_FORWARDING_LATENCY+1) {
68                if (lat == intercluster_latency_map[srcc][destc]) {
135#ifdef MULTI_IQ
136    foreach(i, 4){
137        issueq_count[i] = 0;
logic.h https://github.com/stefanneumann/marss.git | C++ Header | 1,877 lines
88// Iterate forward through queue from head to tail
89#define foreach_forward(Q, i) for (int i = (Q).head; i != (Q).tail; i = add_index_modulo(i, +1, (Q).size))
90
91// Iterate forward through queue from the specified entry until the tail
92#define foreach_forward_from(Q, E, i) for (int i = E->index(); i != (Q).tail; i = add_index_modulo(i, +1, (Q).size))
93
94// Iterate forward through queue from the entry after the specified entry until the tail
95#define foreach_forward_after(Q, E, i) for (int i = add_index_modulo(E->index(), +1, (Q).size); i != (Q).tail; i = add_index_modulo(i, +1, (Q).size))
96
97// Iterate backward through queue from tail to head
98#define foreach_backward(Q, i) for (int i = add_index_modulo((Q).tail, -1, (Q).size); i != add_index_modulo((Q).head, -1, (Q).size); i = add_index_modulo(i, -1, (Q).size))
99
100// Iterate backward through queue from the specified entry until the tail
101#define foreach_backward_from(Q, E, i) for (int i = E->index(); i != add_index_modulo((Q).head, -1, (Q).size); i = add_index_modulo(i, -1, (Q).size))
102
frmMain.cs https://github.com/kordansk/Argus.git | C# | 677 lines
106                xUserData = XElement.Load(UserDataLocalXML);
107                foreach (XElement usersettings in xUserData.Elements("settings"))
108                {
108                {
109                    foreach (XElement xe in usersettings.Elements("user"))
110                    {
119                {
120                    foreach (UserData user in UserInfoList)
121                    {
124                    int i = 0;
125                    foreach (CorpData corp in CorporationDataList)
126                    {
131                }
132                foreach (ListItem item in CorpDropDownList)
133                {
TestNewPlanColumnPrune.java https://github.com/zjffdu/pig.git | Java | 417 lines
38import org.apache.pig.newplan.logical.relational.LogicalRelationalOperator;
39import org.apache.pig.newplan.logical.rules.AddForEach;
40import org.apache.pig.newplan.logical.rules.ColumnMapKeyPrune;
74        query = "a = load 'd.txt';" +
75        "b = foreach a generate $0, $1;" +
76        "store b into 'empty';";  
82        query = "a = load 'd.txt';"+
83        "b = foreach a generate $0, $1;"+
84        "store b into 'empty';";  
89    public void testPrune() throws Exception  {
90        // only foreach
91        String query = "a = load 'd.txt' as (id, v1, v2);" +
407            
408            r = new AddForEach("AddForEach");
409            s = new HashSet<Rule>();
TestMultiQueryCompiler.java https://github.com/zjffdu/pig.git | Java | 1,534 lines
103            myPig.registerQuery("A = load '" + INPUT_FILE + "' as (col1:int, col2:int, col3:int);");
104            myPig.registerQuery("B1 = foreach A generate col1, col2;");
105            myPig.registerQuery("B2 = foreach A generate col2, col3;");
107            myPig.registerQuery("C2 = group B2 by (col2, col3);");
108            myPig.registerQuery("D1 = foreach C1 generate col1, col2;");
109            myPig.registerQuery("D2 = foreach C2 generate B2.col2, B2.col3;");
151            myPig.registerQuery("g1 = group f1 by name;");
152            myPig.registerQuery("p1 = foreach g1 generate group, COUNT(f1.gid);");
153            myPig.registerQuery("store p1 into '/tmp/output1';");
156            myPig.registerQuery("g2 = group f2 by name;");
157            myPig.registerQuery("p2 = foreach g2 generate group, COUNT(f2.gid);");
158            myPig.registerQuery("store p2 into '/tmp/output2';");
161            myPig.registerQuery("g3 = group f3 by name;");
162            myPig.registerQuery("p3 = foreach g3 generate group, COUNT(f3.gid);");
163            myPig.registerQuery("store p3 into '/tmp/output3';");
TestNewPlanPushDownForeachFlatten.java https://github.com/zjffdu/pig.git | Java | 1,175 lines
285        Operator foreach = newLogicalPlan.getSuccessors( load ).get( 0 );
286        Assert.assertTrue( foreach instanceof LOForEach );
287        foreach = newLogicalPlan.getSuccessors( foreach ).get( 0 );
1085        Operator foreach1 = newLogicalPlan.getSuccessors( foreach ).get( 0 );
1086        Assert.assertTrue( foreach1 instanceof LOForEach );
1087        Operator sort = newLogicalPlan.getSuccessors( foreach1 ).get( 0 );
1102        Operator store = newLogicalPlan.getSinks().get( 0 );
1103        LOForEach foreach = (LOForEach)newLogicalPlan.getPredecessors(store).get(0);
1104        Assert.assertTrue(foreach.getSchema().getField(1).alias.equals("q1"));
1138            s = new HashSet<Rule>();
1139            r = new PushDownForEachFlatten( "PushDownForEachFlatten" );
1140            s.add(r);            
1166        Assert.assertTrue( foreach instanceof LOForEach );
1167        foreach = newLogicalPlan.getSuccessors( foreach ).get( 0 );
1168        Assert.assertTrue( foreach instanceof LOForEach );
nightly.conf https://github.com/zjffdu/pig.git | Perl | 4,624 lines
50e = cogroup c by (name, age), d by (name, age) ;
51f = foreach e generate flatten(c), flatten(d);
52g = group f by registration;
52g = group f by registration;
53h = foreach g generate group, SUM(f.d::contributions);
54i = order h by $1;
105a = load ':INPATH:/singlefile/studenttab10k' as (name, age, gpa);
106b = foreach a generate name, org.apache.pig.test.udf.evalfunc.Swap(name, age), TOKENIZE((chararray)name), org.apache.pig.test.udf.evalfunc.CreateMap((chararray)name, age); 
107store b into ':OUTPATH:.intermediate' using BinStorage();
122a = load ':INPATH:/singlefile/textdoc' using TextLoader();
123b = foreach a generate TOKENIZE((chararray)$0);
124store b into ':OUTPATH:' using org.apache.pig.test.udf.storefunc.StringStore();\,
499e = filter d by not IsEmpty(b);
500f = foreach e generate flatten(a), flatten(b);
501store f into ':OUTPATH:';\,
macro.conf https://github.com/zjffdu/pig.git | Unknown | 585 lines
27                         a = load ':INPATH:/singlefile/studenttab10k' as (name, age, gpa);
28                         b = foreach a generate age, name;
29                         store b into ':OUTPATH:';
33          'verify_pig_script' => q#a = load ':INPATH:/singlefile/studenttab10k' as (name, age, gpa);
34                                   b = foreach a generate age, name;
35                                   store b into ':OUTPATH:';#,
40                         a = load '$loadfile' as (name, age, gpa);
41                         b = foreach a generate age, name;
42                         store b into ':OUTPATH:';
46          'verify_pig_script' => q#a = load ':INPATH:/singlefile/studenttab10k' as (name, age, gpa);
47                                   b = foreach a generate age, name;
48                                   store b into ':OUTPATH:';#,
53                         a = load '$loadfile' as (name, age, gpa);
54                         $b = foreach a generate age, name;
55                     }
perf.xml https://github.com/zjffdu/pig.git | XML | 1,201 lines
86<p>The combiner is also used with a nested foreach as long as the only nested operation used is DISTINCT
87(see <a href="basic.html#FOREACH">FOREACH</a> and <a href="basic.html#nestedblock">Example: Nested Block</a>).
88</p>
100<title>When the Combiner is Not Used</title> 
101<p>The combiner is generally not used if there is any operator that comes between the GROUP and FOREACH statements in the execution plan. Even if the statements are next to each other in your script, the optimizer might rearrange them. In this example, the optimizer will push FILTER above FOREACH which will prevent the use of the combiner:</p>
102<source>
119
120<p><strong>Note:</strong> One exception to the above rule is LIMIT. Starting with Pig 0.9, even if LIMIT comes between GROUP and FOREACH, the combiner will still be used. In this example, the optimizer will push LIMIT above FOREACH but this will not prevent the use of the combiner.</p>
121
541<title>PushDownForEachFlatten</title>
542<p>The objective of this rule is to reduce the number of records that flow through the pipeline by moving FOREACH operators with a FLATTEN down the data flow graph. In the example shown below, it would be more efficient to move the foreach after the join to reduce the cost of the join operation.</p>
543<source>
1122<li>Between the load of the sorted input and the merge join statement there can only be filter statements and 
1123foreach statement where the foreach statement should meet the following conditions: 
1124<ul>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21