text:
Q: How can I control "div contenteditable" value ANGULAR In my file make-tweet.component.html, I have the next html tag:, which, I use it to be able to use a div as if it were an input because I add dynamic content with classes, that's why I don't use input.
<div  (input)="handleText($event);"  contenteditable="true" style="width:300px;"#textarea> </div>

With the (input) event, I can see the content of the label.
But what I need is to validate while the user is typing if he meets a requirement. If it doesn't, don't display anything in the "editablecontent" div, something like a "return false". I am using Angular 11.


text:
Q: gRPC Received http2 header with status 307 Error C# I have 3 Projects: ClientA, ServerA, ServerB.
Client A is a client to the server ServerA, ServerA is both Server for ClientA and a client towards ServerB. They all share a .Net Framework Class Library, which contains the .proto file and the generated Clients / ServerImpls. The .proto file gets atomatically interpreted using:
  <ItemGroup>
    <Protobuf Include="protos\proto.proto" OutputDir="%(RelativePath)" CompileOutputs="false" />
  </ItemGroup>

ServerA can call methods from ServerB, but ClientA can not call methods from ServerA (see error in title).
The .proto file looks like this:
    message Ping{
         int64 timestamp = 1;
     }
     message Pong {
         int64 timestamp = 1;
     }

    service ServerAService {
        rpc TestConnection(Ping) returns (Pong);
    }

    service ServerBService {
        rpc TestConnection(Ping) returns (Pong);
    }

Client A is a .NET Framework 4.7.2 Excel Add-in with these packages:

It Connects to ServerA with this code:
    Channel channel = new Channel("127.0.0.1:" + 50051, ChannelCredentials.Insecure);
                client = new ServerAService.ServerAServiceClient(channel);
    if (client.TestConnection(new Ping { Timestamp = DateTime.Now.Ticks }, null) != null)
                { [...]

ServerA is a ASP.NET Core 3.1 Application with the ServerImpl started via Dependency Injection:
 app.UseEndpoints(endpoints =>
            {
                endpoints.MapGrpcService<ServerAServiceImpl>();
                endpoints.MapControllers();
                endpoints.MapBlazorHub();
                endpoints.MapFallbackToPage("/_Host");
            });

and, since IIS does not support gRPC, using Kestrel configured like this:
        public static IHostBuilder CreateHostBuilder(string[] args) =>
            Host.CreateDefaultBuilder(args)
                .ConfigureWebHostDefaults(webBuilder =>
                {
                    webBuilder.UseStartup<StartupServerA>();
                    webBuilder.ConfigureKestrel(options =>
                    {
                        options.Listen(IPAddress.Any, 50051, listenOptions =>
                        {
                            listenOptions.Protocols = HttpProtocols.Http2;
                        });
                    });
                });

ServerA also has theese packages:

ServerA does the same as ClientA does to connect:
var channel = new Channel("localhost:50033", ChannelCredentials.Insecure);
                    ServerBClient serverb = new ServerBClient(channel);

                    if (serverb.TestConnection(new Ping(), null) != null)
                    { [...]

ServerB is also an ASP.NET Core 3.1 App:
app.UseEndpoints(endpoints =>
            {
                endpoints.MapGrpcService<ServerBServiceImpl>();
                endpoints.MapGet("/", async context =>
                {
                    await context.Response.WriteAsync("ServerB Running!");
                });
            });

With kestrel, too:
public static IHostBuilder CreateHostBuilder(string[] args) =>
            Host.CreateDefaultBuilder(args)
            .ConfigureLogging(logging =>
            {
                logging.AddConsole();
            }
            ).ConfigureWebHostDefaults(webBuilder =>
                {
                    webBuilder.UseStartup<StartupServerB>();
                    webBuilder.ConfigureKestrel(options =>
                    {
                        options.Listen(IPAddress.Any, 50033, listenOptions =>
                        {
                            listenOptions.Protocols = HttpProtocols.Http2;
                        });
                    });
                });

and theese packages:

When ClientA calls the ServerA.TestConnection procedure, the error "Received http2 header with status 307" occurs. ServerA can call the ServerB.TestConnection without a problem.
Before switching to ASP.NET Core 3.1 the ServerA and ServerB were running as .NET Framework Console Applications, and were just changed during a refactoring. When everything was running on .NET Framework, ClientA was able to ServerA.TestConnection successfully. Are grpc on .netframework and .netcore incompatible?
What does "Received http2 header with status 307" even mean?
I hope someone has a clue.
Edit:
As suggested by Marc i created a blank project to ultimately upload the test case to github, and could figure out from that that the implementation of "Blazor" is blocking gRPC here. So its not a .net FRAMEWORK <> Core compatiblity issue, its a Blazor <> gRPC issue. I will try to narrow down why blazor redirects the gRPC call, even though its on another port. Maybe gRPC and Blazor need to be run in different services after all.

redpajama_set_name: RedPajamaStackExchange


text:
Q: iOS PJSIP no sound I used PJSIP PJSUA API to develop iOS VoIP applications. I successfully compiled the PJSIP iOS library and registered it successfully. However, when I initiate a call, I get the following error:
19:52:39.821            pjsua_aud.c  .Set sound device: capture=-1, playback=-2
19:52:39.821            pjsua_aud.c  ..Error retrieving default audio device parameters: Unable to find default audio device (PJMEDIA_EAUD_NODEFDEV) [status=420006]
19:52:39.822          pjsua_media.c  .Call 0: deinitializing media..

I looked up some information, such as setting up an empty device:
pjsua_set_null_snd_dev();

This did make a successful call, but there was no sound. I know it's still because I didn't get the audio equipment. What can I do to get the audio equipment successfully?


text:
Q: imagecolorallocate(): Red component is out of range getting error while getting captcha image I have a issue with PHP 7.4.5. I have an CaptchaExtendedAction Extension in Yii1 and sometime I get this error:

imagecolorallocate(): Red component is out of range

at this line

$foreColor = imagecolorallocate($image, mt_rand($r-50,$r+50),
mt_rand($g-50,$g+50),mt_rand($b-50,$b+50));

Anybody has an idea how to avoid this?


text:
Q: HTTP Client Laravel 8 - PUT Request to update doesn't work So, i want to update a data from the API. I use HTTP Client for the connection. POST, GET, DELETE methods are working just fine, except the PUT method. The problem is when i try to update it, the data that i just edited doesn't updated on the table.
I create a view to edit the data, here's my simple form layout on edit.blade.php in view folder.

Edit Data Agenda {{ $data['id'] }}

        <form action="/editAgenda/{{ $data['id'] }}" method="POST">
            @csrf
            @method('PUT')
            hari
            <input type="text" name="hari" class="form-control" aria-describedby="passwordHelpBlock" value="{{ $data['hari'] }}">
            tgl
            <input type="text" name="tgl" class="form-control" aria-describedby="passwordHelpBlock" value="{{ $data['tgl'] }}">
            waktu
            <input type="text" name="waktu" class="form-control" aria-describedby="passwordHelpBlock" value="{{ $data['waktu'] }}">
            lokasi
            <input type="text" name="lokasi" class="form-control" aria-describedby="passwordHelpBlock" value="{{ $data['lokasi'] }}">
            kegiatan
            <input type="text" name="kegiatan" class="form-control" aria-describedby="passwordHelpBlock" value="{{ $data['kegiatan'] }}">
            user_id
            <input type="text" name="user_id" class="form-control" aria-describedby="passwordHelpBlock" value="{{ $data['user_id'] }}">
            <button type="submit" class="mt-3 mb-3 btn btn-primary">Simpan</button>
        </form>

This is get by id function in AgendaController.php to show which the data that we will edit.
public function getIdAgenda($id)
    {
        $response = Http::withToken('31|14gfAJHaXv6qU3x4WwxAwE8TuTdXVEFbGimMly8S')->get('https://kominfo.kotabogor-api.my.id/Agenda/'.$id);
        return view('edit', ['data' => $response['Agenda']]);
    }

And this is the update function in AgendaController.php.
public function editAgenda(Request $request, $id)
    {
        $response = Http::withToken('31|14gfAJHaXv6qU3x4WwxAwE8TuTdXVEFbGimMly8S')->put('https://kominfo.kotabogor-api.my.id/AgendaUpd/'.$id, [
            'hari' => $request->hari,
            'tgl' => $request->tgl,
            'waktu' => $request->waktu,
            'lokasi' => $request->lokasi,
            'kegiatan' => $request->kegiatan,
            'user_id' => $request->user_id
        ]);

        return redirect('/Agenda');
    }

Lastly, here's the route in web.php.
Route::put('/editAgenda/{id}', [AgendaController::class, 'editAgenda']);

If you want to see my full source code adn try it on your own, this is my github link for the project: https://github.com/decrager/httpclient-crud.git
Thank you


text:
Q: How to Handle Out of memory? We are developing a mobile app where consumers (companies) create AR content for their products.
The content ranges from simple pictures to gifs and embedded videos. We already released versions before but now some devices (especially older devices) crash due to out of memory errors.
It is worth noting that Videos are streamed, not downloaded. The issue here are the pictures that need to be decoded and made to be ready for the GPU.
restricting content size wouldn't really help because our client wants potentially infinite pictures/videos. Sooner or later we would run out of memory. The content may be small to download, but bigger to encode (jpg is compressed and transformed into per-Pixel data for example).
We already remove the content of previous products, so we have the content of only one product in memory.
My question is how should we handle such out of memory scenarios?

A: In most programming languages, an out-of-memory condition is reported by means of an exception that gets thrown. If this exception is not handled by the application, then the unhandled exception causes the application to crash. To avoid the crash, you need to catch the exception and handle it in a sensible way.
What a sensible way is to handle out-of-memory conditions depends to some extent on what is acceptable to your users. As you already identified the picture loading as a potential hotspot for memory problems, you could decide that if there isn't enough memory for all pictures, to load them one by one, right at the moment they need to be shown.
If even a single picture is too large, you can have a second fallback to inform the user that that picture isn't available to them on that device. That would give a degraded user-experience, but not as bad as a crash.


text:
Q: How to persist a Materialize chips input as valid once a chip is entered? I'm currently validating a large, multi-section form using Materialize and jQuery-Validate and running into an issue with chips inputs where, once you press 'enter' to create a chip, the input 'resets' and triggers the validation's "required field" error msg. I can see in the dev console, pressing "enter" is toggling a valid/error class on the input (which is what hides/shows the error) as well as an aria-invalid attribute that toggles true/false. I also see a div with the class "chip" added above the input for each chip created. Here's an example of the output with a couple of chips:

chip1close

chip2close

   <input id="dfullname" name="dfullname" data-error=".errorTxt15" class="input error" autocomplete="off" placeholder="+Name" aria-describedby="dfullname-error" aria-invalid="true">

This field is required.

I've been playing around with Materialize's methods for chips (onChipAdd and onChipDelete) and scouring SO because I can't even get a console.log out of them. I was thinking that I might be able to leverage them somehow (in pseudocode, 'onChipDelete check if the input is empty')
Have also tried basic if/else logic checking for .chip class (i.e., 'if it exists log this, if it doesn't log that') but neither are yielding the results I'm after.
So, for a given input, how can I ensure/check that the input remains valid if a chip exists on it and trigger it as invalid if there are no chips? I've created a starter pen here and posted the code below:
https://codepen.io/anon/pen/MRmNag
For the code to work, the following have to be added (all available on CDNs):

*

*Materialize (both CSS/JS)

*jQuery

*jQuery Validate

HTML:

  <form id="portal" action="#">

        <input id="dfullname" name="dfullname" data-error=".errorTxt15" class="input" autocomplete="off">

        <input id="efullname" name="efullname" data-error=".errorTxt16" class="input" autocomplete="off">

        <button class="waves-effect waves-light btn-large btn-cyan">Submit</button>

  </form>

CSS:
.input-field div.error {
  position: relative;
  top: -.25rem;
  left: 0rem;
  font-size: 0.8rem;
  color: red;
  transform: translateY(0%);
}

JS:
// Add custom validation for chips
$.validator.addMethod('validatechips', function(value, element) {
  if (!$('.chip')) {
    return this.optional(element) || value !== '';
  } else {
    return false;
  }
}, 'This is a required field.');

// Initialize chips
$('.chips').chips();
$('.chips-placeholder').chips({
  placeholder: '+Name',
  secondaryPlaceholder: '+Name'
});

// Initialize jQuery-validate
$('#portal').validate({
  rules: {
    dfullname: {validatechips: true},
    efullname: {validatechips: true}
  },
  errorElement: 'div',
  errorPlacement: function (error, element) {
    var placement = $(element).data('error');
    if (placement) {
      $(placement).append(error);
    } else {
      error.insertAfter(element);
    }
  }
});


text:
Q: How to enable text-to-speech on a cell in a grid view (Kotlin) I am trying to create a small game with the following components:

*

*9 cells - in a GridView

*some words (that have to be introduced in the table, each on a cell)

*TextToSpeech - on each cell

Each single cell contains one single word and the user has to choose one of the words displayed below in order to complete the cell (2 words are supposed to be in a cell).
Everything works perfectly, the only problem is that the TextToSpeech is being activated once the user chooses the right word, but I would want it to be one step forward. That means, once the user chooses the right word for ONE cell, the TextToSpeech should be automatically activated for the NEXT cell, so once the user has chosen the right word, he should hear the next word from the next cell.
These cells don't have ids, they are in the MainActivity, like this:
private fun setData() {
        dataBeanArrayList = ArrayList<CellDataBean>()
        val cellDataBean = CellDataBean()
        //we store in the var cellDataBean both texts
        //according to the class CellDataBean
        cellDataBean.text_one = "Hello"
        cellDataBean.text_two = "World"
        dataBeanArrayList!!.add(cellDataBean)
        val cellDataBean1 = CellDataBean()
        cellDataBean1.text_one = "Okay"
        cellDataBean1.text_two = "Not bad"

If I implement a new text view (which is not preferable), the TextToSpeech only works like I want for the first cell, once you press on this:
starttv.setOnClickListener {

            if (count == 0) {
                isstart = true

                    val text: String = dataBeanArrayList[count].text_1
                    textToSpeech!!.speak(text, TextToSpeech.QUEUE_FLUSH, null)

                dataBeanArrayList[count].isSelected = true
                cellAdapter!!.notifyDataSetChanged()
            }
        }

I am trying to implement something like: (where 'mainbacklay' is the ID from the cell)
when(vh.mainbacklay)[position]==0{
// here the text to speech should be enabled for the text from the second cell with the position 1
}

So when the position 2 from the cell is activated, the text to speech should be enabled for the text with the third position and so on.
Could someone help me figure this out, please?
Thank you.

A: I don't have a clear picture of exactly how your app operates, but I think you want something like this:
fun setAnswer(cellNumber: Int, text: String) {
    // Update the data with the selected text etc

    // Announce the text for cellNumber+1, or a fallback when there is no next cell
    val message = dataBeans.getOrNull(cellNumber + 1)?.text_1 ?: "You're done!"
    textToSpeech.speak(message, TextToSpeech.QUEUE_FLUSH, null)
}

and then whenever your event (a click or whatever) happens for cell n, you call that function. It takes care of handling that event, managing the overall state, and doing anything that needs to happen as a result (like announcing the next cell's contents, or moving to an endgame screen, etc.
Basically you don't want your individual cells / TextViews / ViewHolders managing that overall state and interacting with each other and each other's data. Just hand it off to a central function or component that manages what's going on, and tells the UI what to display. Makes it a lot easier!
Hope that helps, I can only be general without seeing exactly what you're doing


text:
Q: Unable to sort the date column when getting dynamically using javascript and table sorter Am getting dynamically through json and adding it to the table. When am trying to sort the table through published date am getting error as cannot read property '2' of undefined am using table sorter plugin. Here is my code..

    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">

  <input type="text" name="keyword" id="keyword" placeholder="playlistid">
  <input type="number" name="max_results" id="max_results" placeholder="max results">
   <button type="submit" name="results" id="results" onclick="searchVideo($('#keyword').val())">Submit</button>

        VIDEO ID
       VIDEO TITLE
        PUBLISHED DATE
        CHANNELNAME
         VIEWS

Can anyone please help me with the sorting . Thanks in advance . Tablesorter plugin is not detecting the table

A: You have initalized table sorter after page loading on an empty table.
Instead remove that and initalize the plugin right after fetching data from YT-API and setting it to your table
$('table tbody').append(....)
$('#keywords').tablesorter();

For sorting dates please look into tablesorter demo/examples - out of the box it's only possible for standard date formats ;-)


text:
Q: How to display input values to ionic grid? I am new to Ionic and I am trying to do this, I want to pass the value from my input to my ionic grid. Can anyone give me an idea on how to do this? Thank you for answering.

A: First you need to get first name value and last name value as form data. Then add it to an array. In Html side you can loop that array and value can add to the rows of grid.
Check this angular tutorial to get clear idea
https://www.syntaxsuccess.com/viewarticle/angular-2.0-input-values-and-binding

A: I think you should learn angular instead of ionic/react, here is why...
[the following is a personal opinion from personal experience]
I started learning ionic react but by the time I had finished the documentation and my project, I left having learned nothing. This half full feeling. It was odd that I couldn't fully grasp a simple object class container language as I program almost every day of the year for fun. I couldn't figure it out, it bugged me for a while but I took the L.
a few months pass and then I begin learning Angular as a second attempt at hybrid PWAs.
Having used Angular and Ionic/React, Angular blows Ionic/React out of the water when it comes to learning and understanding the material. Angular s docs are well orchestrated and the framework is as enjoyable as it is popular.
Comparing Official docs between Angular and Ionic.

*

*Ionic/react documentation demos were outdated making it impossible to follow the example code vs the interactive demo

*Ionic/react documentation is unreliable. at the time it was a gamble between 'updated', 'outdated','missing-information' (makes it impossible to build a proper project)

*Angular's documentation is updated, accurate, thorough and overall superb

*Angular has a greater online presence with an active online community, Q and A.

*Easier to work with, less headaches, constant updates

Ionic documentation is a travel brochure.
Angular documentation is a map.
If you are going hiking in the woods, do you want a map or a travel brochure?
Posted some links below.
https://angular.io/docs
Covers all topics, demos are accurate
https://material.angular.io/components/categories
Ready Components


text:
Q: Multi schema XSDs node-soap This may be on the same lines as this:
node-soap multiple import schemas
But I coudnt find the fix.
I have a WSDL which refers to one XSD and this XSD refers another one.
Parent.wsdl --> a.xsd -->b.xsd
node-soap is not able to create namespace for b.xsd due to which the soap request packet does not have entry for b.xsd types.
Please let me know how can I address this.
I have tried node-soap for 1 xsd scenario and it works perfectly fine.


text:
Q: Matrix multiplication with transpose with Tensorflow Trying to do MatrixMultiplication in TF
import tensorflow as tf
a1 = tf.constant(tf.random.normal(shape=(5,4,64)))
tf.matmul(a1,a1,transpose_b=True)

This works perfectly fine, but if I transpose the input a1 manually like the following, I get an error:
tf.matmul(a1,tf.transpose(a1))

Error:
InvalidArgumentError: In[0] and In[1] must have compatible batch dimensions: [5,4,64] vs. [64,4,5] [Op:BatchMatMulV2]

Documentation:
transpose_b: If True, b is transposed before multiplication.

So I don't understand the difference, any suggestions will be helpful.

A: To compute the batch matrix multiplication you need to ensure the following format for the 3D tensor. Check the 3-D tensor matrix multiplication.
[batchs, h`, w`] @ [batchs, w``, h``]

So, in your above case, it should be
import tensorflow as tf

a1 = tf.constant(tf.random.normal(shape=(5,4,64)))

a1.shape, tf.transpose(a1, perm=[0, 2, 1]).shape
(TensorShape([5, 4, 64]), TensorShape([5, 64, 4]))

# swape the height and width - not batch axis
tf.matmul(a1, tf.transpose(a1, perm=[0, 2, 1])).shape
TensorShape([5, 4, 4])


text:
Q: why is this code displaying all comments? I've got the code displaying comments but it's displaying all comments not just ones that are equal, can't figure this out.
<?php
$sql = "SELECT * FROM contactnotes,contacts WHERE contactnotes.contacts_id = contacts.ID ORDER BY contactnotes.timestamp DESC" or die('Error: ' .mysql_error());

$result = mysql_query($sql) or die ('Error: ' .mysql_error());

while ($row = mysql_fetch_array($result)){

?>

<? echo $row['agentassigned']; ?> on <? echo date("F d Y @ h:i:s", strtotime($row['timestamp'])); ?> wrote:

<? echo $row['notes']; ?>

A: I'm assuming you are looking to show all notes for a contact, try rewriting your query as follows:
"SELECT * FROM contactnotes,contacts WHERE contactnotes.contacts_id = contacts.ID AND contacts.ID = " . mysql_real_escape_string($id) . " ORDER BY contactnotes.timestamp DESC"

A: FYI:
$sql = "SELECT * FROM ..... DESC" or die('Error: ' .mysql_error());

You're doing a string assignment, not a MySQL operation. Assignments cannot fail in PHP, so the or die() will NEVER be triggered, and it's not a MySQL operation, so even if the assignment did somehow miraculously fail, the error message would be completely wrong and utterly useless.


text:
Q: Filtering Istope list by wordpress tags So I am using a custom post type and isotope to create a filterable grid of images / links, which are in fact categories.
I wish to use tags for the filtering menu. here is the code for the tag / filter menu:

Show All

<?php query_posts('category_name=themes-page'); if (have_posts()) : while (have_posts()) : the_post();

    $terms =  get_the_terms( $post->ID, "post_tag" );

        foreach ( $terms as $term ) {  //for each term:
            echo "
slug."'>" . $term->name . "
\n";
            //create a list item with the current term slug for sorting, and name for label
        }

endwhile; endif;
wp_reset_query();
?>

And the code for the actual grid:
    <?php $the_query = new WP_Query( array( 'post_type' => 'netsuke',  'orderby' => 'title', 'order' => 'DESC', 'category_name' => 'themes-page', 'posts_per_page' => '3') );
        //Check the WP_Query docs to see how you can limit which posts to display
        if ( $the_query->have_posts() ) : ?>

        <?php while ( $the_query->have_posts() ) : $the_query->the_post();
        $termsArray = get_the_terms( $post->ID, "post_tag" );  //Get the terms for this particular item
        $termsString = ""; //initialize the string that will contain the terms
        foreach ( $termsArray as $term ) { // for each term
        $termsString .= $term->slug.' '; //create a string that has all the slugs
        }
        ?>
    <div class="<?php echo $termsString; ?> item col-sm-4">
        <a href="<?php the_permalink(); ?>" ><?php // 'item' is used as an identifier (see Setp 5, line 6) ?>

<?php the_title(); ?>

            <?php if ( has_post_thumbnail() ) {
                  the_post_thumbnail();
            } ?>

<?php endwhile;  ?>

The problem is that I keep seeing duplicate tags, which defeats the object really. The idea is that these items CAN share tags, and thus be filtered accordingly.
I have tried array_unique but it breaks the template (not clear why)
It is possible to hide duplicates with JQuery but I would rather get this correct, it is annoying me.

A: I built a similar script with a CPT and ISTOPE filters on taxonomies.

        <?php
        $query = $GLOBALS['wp_query'];
        if(!empty($query->posts)){
            ?>

                    <?php
                    $terms = get_terms( 'typerealisation', array(
                        'hide_empty' => false,
                    ) );
                    if(!empty($terms)){
                        ?>

                            <button class="button is-checked" data-filter="*"><?php _e( 'All', 'domain' ); ?></button>
                            <?php
                            foreach ($terms as $key => $term) {
                                ?>
                                <button class="button" data-filter=".<?php echo $term->slug; ?>"><?php echo $term->name; ?></button>
                                <?php
                            }
                            ?>

                        <?php
                    }
                    ?>

                    <?php
                    foreach ($query->posts as $key => $value) {
                        $terms = wp_get_post_terms( $value->ID, 'typerealisation' );
$classes = '';
foreach( $terms as $term ) {
    $classes .= $term->slug.' ';
}

?>
<div class="realisation element-item <?php echo $classes; ?>">
    <?php echo get_the_post_thumbnail($value->ID, null, array( 'class' => 'realisation-thumb' )); ?>

            <?php echo $value->post_title; ?>

            <?php echo get_the_term_list( $value->ID, 'typerealisation', '#', ' #' ); ?>

        <a href="<?php echo get_permalink($value->ID); ?>" class="realisation-bouton">

                    }
                    ?>

            <?php
        }
        ?>

and JS
// init Isotope
    var $grid = $('.grid').isotope({
        itemSelector: '.element-item',
        masonry: {
            // use outer width of grid-sizer for columnWidth
            columnWidth: '.grid-sizer',
            gutter: '.gutter-sizer',
        }
    });
    // bind filter button click
    $('.filters-button-group').on('click', 'button', function() {
        var filterValue = $(this).attr('data-filter');
        $grid.isotope({
            filter: filterValue
        });
    });
    // change is-checked class on buttons
    $('.button-group').each(function(i, buttonGroup) {
        var $buttonGroup = $(buttonGroup);
        $buttonGroup.on('click', 'button', function() {
            $buttonGroup.find('.is-checked').removeClass('is-checked');
            $(this).addClass('is-checked');
        });
    });

A: I found the solution, after a lot of trial and error.
The key thing is NOT to use the wordpress loop, rather get posts by ID.
This was based on another stackexhange answer, located here: https://wordpress.stackexchange.com/questions/184560/creating-a-unique-linked-list-of-tags-from-a-specific-category

Show All

  <?php  $post_ids = get_posts(
    array(
        'posts_per_page' => -1,
        'category_name'  => 'themes-page',
        'post_type' => 'netsuke',
        'fields'         => 'ids', // Just get the ID's, save a hella lotta memory
    )
);

// Get and cache all post tags
update_object_term_cache( $post_ids, 'netsuke' );

// Build a unique index of tags for these posts
$tags = array();
foreach ( $post_ids as $post_id ) {
    if ( $post_tags = get_object_term_cache( $post_id, 'post_tag' ) ) {
        foreach ( $post_tags as $tag )
            $tags[ $tag->term_id ] = $tag;
    }
}
// Show them, with slug and name

foreach ( $tags as $tag ) {

  //  echo '' . $tag->name . ' ';
     echo "
slug."'>" . $tag->name . "
\n";
}
?>

And the Grid:
 <?php $the_query = new WP_Query( array( 'post_type' => 'netsuke',  'orderby' => 'title', 'order' => 'DESC', 'category_name' => 'themes-page', 'posts_per_page' => '3') );
            //Check the WP_Query docs to see how you can limit which posts to display
            if ( $the_query->have_posts() ) : ?>

            <?php while ( $the_query->have_posts() ) : $the_query->the_post();
            $termsArray = get_the_terms( $post->ID, "post_tag" );  //Get the terms for this particular item
            $termsString = ""; //initialize the string that will contain the terms
            foreach ( $termsArray as $term ) { // for each term
            $termsString .= $term->slug.' '; //create a string that has all the slugs
            }
            ?>
        <div class="<?php echo $termsString; ?> item col-sm-4">
            <a href="<?php the_permalink(); ?>" ><?php // 'item' is used as an identifier (see Setp 5, line 6) ?>

<?php the_title(); ?>

                <?php if ( has_post_thumbnail() ) {
                      the_post_thumbnail();
                } ?>

    <?php endwhile;  ?>

<?php endif; ?>


text:
Q: Can you access the ID of a Control added to an asp page in code-behind I am adding nodes to a Treeview in an asp via code-behind.  Is there a way of getting the id of the node after I've added it, example code:
e.Node.ChildNodes.Add()

How can I grab the id of the Node I'm adding (or added)?  Just to be clear I'm trying to access the id that will be on the item on the page and could be used by client-code.
Code snippet of adding the Nodes:
Private Sub navTree_TreeNodePopulate(sender As Object, e As TreeNodeEventArgs) Handles navTree.TreeNodePopulate
Dim TestNode As New TreeNode
TestNode.Text = "Test"
e.Node.ChildNodes.Add(TestNode)
but .add has no return value

A: In VB, each TreeNode has a collection of child nodes in its ChildNodes property. The Add method returns void, so that's of no help in identifying the new node from your code behind. Microsoft's docs describe a TreeNode's Value property as "a non-displayed value used to store any additional data about the node, such as data used for handling postback events", and give an example of using it to store an ID (follow the link below to see their example)
Something like this might work in your case:
//to add the node
Private Sub navTree_TreeNodePopulate(sender As Object, e As TreeNodeEventArgs) Handles navTree.TreeNodePopulate

Dim TestNode As New TreeNode
TestNode.Text = "This is a test node."
TestNode.Value= 123 //your data's ID
e.Node.ChildNodes.Add(TestNode)

//to find the node by its ID later you'll have to loop through the collection and look for `Value == 123`

More info:
https://learn.microsoft.com/en-us/dotnet/api/system.web.ui.webcontrols.treenode.value?view=netframework-4.8


text:
Q: I am trying to start up the server for rails and I get the following error /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/webpacker-5.2.1/lib/webpacker/configuration.rb:99:in rescue in load': Webpacker configuration file not found /Users/griselpaiz/test_app/config/webpacker.yml. Please run rails webpacker:install Error: No such file or directory @ rb_sysopen - /Users/griselpaiz/test_app/config/webpacker.yml (RuntimeError) from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/webpacker-5.2.1/lib/webpacker/configuration.rb:95:in load'
from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/webpacker-5.2.1/lib/webpacker/configuration.rb:92:in data' from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/webpacker-5.2.1/lib/webpacker/configuration.rb:88:in fetch'
from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/webpacker-5.2.1/lib/webpacker/configuration.rb:43:in public_path' from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/webpacker-5.2.1/lib/webpacker/configuration.rb:47:in public_output_path'
from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/webpacker-5.2.1/lib/webpacker/configuration.rb:51:in public_manifest_path' from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/webpacker-5.2.1/lib/webpacker/manifest.rb:83:in load'
from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/webpacker-5.2.1/lib/webpacker/manifest.rb:18:in refresh' from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/webpacker-5.2.1/lib/webpacker/commands.rb:47:in bootstrap'
from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/webpacker-5.2.1/lib/webpacker.rb:35:in bootstrap' from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/webpacker-5.2.1/lib/webpacker/railtie.rb:41:in block in class:Engine'
from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/railties-6.1.3/lib/rails/initializable.rb:32:in instance_exec' from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/railties-6.1.3/lib/rails/initializable.rb:32:in run'
from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/railties-6.1.3/lib/rails/initializable.rb:61:in block in run_initializers' from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/3.0.0/tsort.rb:228:in block in tsort_each'
from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/3.0.0/tsort.rb:350:in block (2 levels) in each_strongly_connected_component' from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/3.0.0/tsort.rb:431:in each_strongly_connected_component_from'
from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/3.0.0/tsort.rb:349:in block in each_strongly_connected_component' from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/3.0.0/tsort.rb:347:in each'
from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/3.0.0/tsort.rb:347:in call' from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/3.0.0/tsort.rb:347:in each_strongly_connected_component'
from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/3.0.0/tsort.rb:226:in tsort_each' from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/3.0.0/tsort.rb:205:in tsort_each'
from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/railties-6.1.3/lib/rails/initializable.rb:60:in run_initializers' from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/railties-6.1.3/lib/rails/application.rb:384:in initialize!'
from /Users/griselpaiz/test_app/config/environment.rb:5:in <main>' from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in require'
from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in block in require_with_bootsnap_lfi' from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in register'
from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in require_with_bootsnap_lfi' from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in require'
from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/zeitwerk-2.4.2/lib/zeitwerk/kernel.rb:34:in require' from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/activesupport-6.1.3/lib/active_support/dependencies.rb:332:in block in require'
from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/activesupport-6.1.3/lib/active_support/dependencies.rb:299:in load_dependency' from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/activesupport-6.1.3/lib/active_support/dependencies.rb:332:in require'
from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:53:in require_relative' from config.ru:3:in block in '
from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rack-2.2.3/lib/rack/builder.rb:116:in eval' from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rack-2.2.3/lib/rack/builder.rb:116:in new_from_string'
from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rack-2.2.3/lib/rack/builder.rb:105:in load_file' from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rack-2.2.3/lib/rack/builder.rb:66:in parse_file'
from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rack-2.2.3/lib/rack/server.rb:349:in build_app_and_options_from_config' from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rack-2.2.3/lib/rack/server.rb:249:in app'
from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rack-2.2.3/lib/rack/server.rb:422:in wrapped_app' from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/railties-6.1.3/lib/rails/commands/server/server_command.rb:77:in log_to_stdout'
from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/railties-6.1.3/lib/rails/commands/server/server_command.rb:37:in start' from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/railties-6.1.3/lib/rails/commands/server/server_command.rb:144:in block in perform'
from internal:kernel:90:in tap' from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/railties-6.1.3/lib/rails/commands/server/server_command.rb:135:in perform'
from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/thor-1.1.0/lib/thor/command.rb:27:in run' from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/thor-1.1.0/lib/thor/invocation.rb:127:in invoke_command'
from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/thor-1.1.0/lib/thor.rb:392:in dispatch' from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/railties-6.1.3/lib/rails/command/base.rb:69:in perform'
from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/railties-6.1.3/lib/rails/command.rb:50:in invoke' from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/railties-6.1.3/lib/rails/commands.rb:18:in '
from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in require' from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in block in require_with_bootsnap_lfi'
from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in register' from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in require_with_bootsnap_lfi'
from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in require' from /Users/griselpaiz/test_app/bin/rails:5:in <top (required)>'
from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/spring-2.1.1/lib/spring/client/rails.rb:28:in load' from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/spring-2.1.1/lib/spring/client/rails.rb:28:in call'
from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/spring-2.1.1/lib/spring/client/command.rb:7:in call' from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/spring-2.1.1/lib/spring/client.rb:30:in run'
from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/spring-2.1.1/bin/spring:49:in <top (required)>' from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/spring-2.1.1/lib/spring/binstub.rb:11:in load'
from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/spring-2.1.1/lib/spring/binstub.rb:11:in <top (required)>' from <internal:/Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in require'
from internal:/Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb:85:in require' from /Users/griselpaiz/test_app/bin/spring:10:in block in <top (required)>'
from internal:kernel:90:in tap' from /Users/griselpaiz/test_app/bin/spring:7:in <top (required)>'
from bin/rails:2:in load' from bin/rails:2:in '
/Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/webpacker-5.2.1/lib/webpacker/configuration.rb:96:in read': No such file or directory @ rb_sysopen - /Users/griselpaiz/test_app/config/webpacker.yml (Errno::ENOENT) from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/webpacker-5.2.1/lib/webpacker/configuration.rb:96:in read'
from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/webpacker-5.2.1/lib/webpacker/configuration.rb:96:in load' from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/webpacker-5.2.1/lib/webpacker/configuration.rb:92:in data'
from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/webpacker-5.2.1/lib/webpacker/configuration.rb:88:in fetch' from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/webpacker-5.2.1/lib/webpacker/configuration.rb:43:in public_path'
from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/webpacker-5.2.1/lib/webpacker/configuration.rb:47:in public_output_path' from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/webpacker-5.2.1/lib/webpacker/configuration.rb:51:in public_manifest_path'
from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/webpacker-5.2.1/lib/webpacker/manifest.rb:83:in load' from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/webpacker-5.2.1/lib/webpacker/manifest.rb:18:in refresh'
from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/webpacker-5.2.1/lib/webpacker/commands.rb:47:in bootstrap' from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/webpacker-5.2.1/lib/webpacker.rb:35:in bootstrap'
from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/webpacker-5.2.1/lib/webpacker/railtie.rb:41:in block in <class:Engine>' from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/railties-6.1.3/lib/rails/initializable.rb:32:in instance_exec'
from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/railties-6.1.3/lib/rails/initializable.rb:32:in run' from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/railties-6.1.3/lib/rails/initializable.rb:61:in block in run_initializers'
from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/3.0.0/tsort.rb:228:in block in tsort_each' from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/3.0.0/tsort.rb:350:in block (2 levels) in each_strongly_connected_component'
from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/3.0.0/tsort.rb:431:in each_strongly_connected_component_from' from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/3.0.0/tsort.rb:349:in block in each_strongly_connected_component'
from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/3.0.0/tsort.rb:347:in each' from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/3.0.0/tsort.rb:347:in call'
from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/3.0.0/tsort.rb:347:in each_strongly_connected_component' from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/3.0.0/tsort.rb:226:in tsort_each'
from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/3.0.0/tsort.rb:205:in tsort_each' from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/railties-6.1.3/lib/rails/initializable.rb:60:in run_initializers'
from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/railties-6.1.3/lib/rails/application.rb:384:in initialize!' from /Users/griselpaiz/test_app/config/environment.rb:5:in '
from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in require' from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in block in require_with_bootsnap_lfi'
from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in register' from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in require_with_bootsnap_lfi'
from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in require' from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/zeitwerk-2.4.2/lib/zeitwerk/kernel.rb:34:in require'
from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/activesupport-6.1.3/lib/active_support/dependencies.rb:332:in block in require' from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/activesupport-6.1.3/lib/active_support/dependencies.rb:299:in load_dependency'
from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/activesupport-6.1.3/lib/active_support/dependencies.rb:332:in require' from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:53:in require_relative'
from config.ru:3:in block in <main>' from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rack-2.2.3/lib/rack/builder.rb:116:in eval'
from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rack-2.2.3/lib/rack/builder.rb:116:in new_from_string' from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rack-2.2.3/lib/rack/builder.rb:105:in load_file'
from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rack-2.2.3/lib/rack/builder.rb:66:in parse_file' from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rack-2.2.3/lib/rack/server.rb:349:in build_app_and_options_from_config'
from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rack-2.2.3/lib/rack/server.rb:249:in app' from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rack-2.2.3/lib/rack/server.rb:422:in wrapped_app'
from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/railties-6.1.3/lib/rails/commands/server/server_command.rb:77:in log_to_stdout' from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/railties-6.1.3/lib/rails/commands/server/server_command.rb:37:in start'
from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/railties-6.1.3/lib/rails/commands/server/server_command.rb:144:in block in perform' from <internal:kernel>:90:in tap'
from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/railties-6.1.3/lib/rails/commands/server/server_command.rb:135:in perform' from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/thor-1.1.0/lib/thor/command.rb:27:in run'
from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/thor-1.1.0/lib/thor/invocation.rb:127:in invoke_command' from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/thor-1.1.0/lib/thor.rb:392:in dispatch'
from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/railties-6.1.3/lib/rails/command/base.rb:69:in perform' from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/railties-6.1.3/lib/rails/command.rb:50:in invoke'
from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/railties-6.1.3/lib/rails/commands.rb:18:in <main>' from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in require'
from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in block in require_with_bootsnap_lfi' from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in register'
from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in require_with_bootsnap_lfi' from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in require'
from /Users/griselpaiz/test_app/bin/rails:5:in <top (required)>' from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/spring-2.1.1/lib/spring/client/rails.rb:28:in load'
from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/spring-2.1.1/lib/spring/client/rails.rb:28:in call' from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/spring-2.1.1/lib/spring/client/command.rb:7:in call'
from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/spring-2.1.1/lib/spring/client.rb:30:in run' from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/spring-2.1.1/bin/spring:49:in <top (required)>'
from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/spring-2.1.1/lib/spring/binstub.rb:11:in load' from /Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/spring-2.1.1/lib/spring/binstub.rb:11:in <top (required)>'
from internal:/Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb:85:in require' from <internal:/Users/griselpaiz/.rbenv/versions/3.0.0/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in require'
from /Users/griselpaiz/test_app/bin/spring:10:in block in <top (required)>' from <internal:kernel>:90:in tap'
from /Users/griselpaiz/test_app/bin/spring:7:in <top (required)>' from bin/rails:2:in load'
from bin/rails:2:in `'

A: The error message clearly mentions what the issue is and offers the solution as well.

Webpacker configuration file not found /Users/griselpaiz/test_app/config/webpacker.yml.

Run rails webpacker:install to configure Webpacker and you should be good to go.


text:
Q: Log-in to Google Account in Android WebView I'm integrating Google Drive in my application.
Using the below link I'm able to connect to Google drive and able to download files and able to upload files to Google drive.
https://developers.google.com/drive/quickstart-android
Below is the code I'm using to upload file to Drive.
Inline image 2
Using the above code I'm able to upload a file to drive and from the line numbers 20 - 23 in the above pic, I'm getting the file meta data such as downloadUrl, alternateUrl and webcontentLink.
Now I'm trying to load a WebView with the AlternateUrl and the page is loading but it is asking for Google credentials again. How to avoid the webview from asking Google Credential. Programmatically, how to login to Google account in webview without explicitly entering Google username and password. I want webview to pick account using either AccountManager or Google Play Service api.
I referred below links, but not able to get it done what I needed.
http://nelenkov.blogspot.in/2012/11/sso-using-account-manager.html
Any help in this regard would be highly appreciated.


text:
Q: IIS URL Rewrite equivalent for Question2Answer mod_rewrite What IIS URL Rewrite rule set in web.config is equivalent to this mod_rewrite rule set provided in Question2Answer's default .htaccess?
DirectoryIndex index.php
<IfModule mod_rewrite.c>
RewriteEngine On
#RewriteBase /
RewriteCond %{REQUEST_URI} ^(.*)//(.*)$
RewriteRule . %1/%2 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^.*$ index.php?qa-rewrite=$0&%{QUERY_STRING} [L]
</IfModule>

The rule differs from a typical WordPress-style rewrite in that nested path elements need to be passed through. Following is an example of a test URL that Question2Answer uses to verify rewriting is working, when Question2Answer is deployed into a qa directory on the server (deployment to the web root fails similarly):
http://localhost:32568/qa/url/test/%24%26-_~%23%25%5C%40%5E%2A%28%29%3D%21%28%29%5D%5B%60%27%3B%3A%7C%22.%7B%7D%2C%3C%3E%3F%23+%CF%80%C2%A7%C2%BD%D0%96%D7%A9?dummy=&param=%24%26-_%7E%23%25%5C%40%5E%2A%28%29%3D%21%28%29%5D%5B%60%27%3B%3A%7C%22.%7B%7D%2C%3C%3E%3F%23+%CF%80%C2%A7%C2%BD%D0%96%D7%A9

This is what IIS Manager's "Import mod_rewrite rules" feature came up with:
<rewrite>
   <rules>
      <rule name="Imported Rule 1" stopProcessing="true">
      <match url="." ignoreCase="false" />
      <conditions>
         <add input="{URL}" pattern="^(.*)//(.*)$" ignoreCase="false" />
      </conditions>
      <action type="Redirect" redirectType="Permanent" url="{C:1}/{C:2}" />
      </rule>
      <rule name="Imported Rule 2" stopProcessing="true">
      <match url="^.*$" ignoreCase="false" />
      <conditions>
         <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
         <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
      </conditions>
      <action type="Redirect" url="index.php?qa-rewrite={R:0}&{QUERY_STRING}" appendQueryString="false" />
      </rule>
   </rules>
</rewrite>

I also added this so that the test URLs would fail in the same way as the actual navigation URLs:
<security>
   <requestFiltering allowDoubleEscaping="true" />
</security>

There is no answer to a question covering this on question2answer QA's site. Hopefully someone experienced in IIS URL Rewrite here will know.

A: This configuration works:
<?xml version="1.0"?>
<configuration>
  <system.webServer>

    <rewrite>
      <rules>
        <rule name="DeduplicateSlashes" stopProcessing="true">
          <match url="." ignoreCase="false" />
          <conditions>
            <add input="{URL}" pattern="^(.*)//(.*)$" ignoreCase="false" />
          </conditions>
          <action type="Redirect" redirectType="Permanent" url="{C:1}/{C:2}" />
        </rule>
        <rule name="CleanRouting" stopProcessing="true">
          <match url="^.*$" ignoreCase="false" />
          <conditions>
            <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
            <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
          </conditions>
          <action type="Rewrite" url="index.php?qa-rewrite={R:0}&{QUERY_STRING}" appendQueryString="false" />
        </rule>
      </rules>
    </rewrite>

    <!-- Double escaping is needed for URLs with '+', e.g. for the account page for a username with a space. -->
    <security>
       <requestFiltering allowDoubleEscaping="true" />
    </security>

  </system.webServer>
</configuration>


text:
Q: LWC Navigation Mixin not replacing current page? When i try to navigate to a webpage it's loading in a new page. I want to replace current page url with the navigation URL. It' not working with below code. can anyone tell how to replace current page????
<template>
    <button onclick={navigateToWebPage}>Click To Navigate</button>
</template>

import { LightningElement, api, track } from 'lwc';
import { NavigationMixin } from "lightning/navigation";
export default class SelectComponent extends NavigationMixin(LightningElement) {
navigateToWebPage() {
    // Navigate to a URL
    this[NavigationMixin.Navigate]({
        type: 'standard__webPage',
        attributes: {
            url: 'http://salesforce.com'
        }
    },
    true // Replaces the current page in your browser history with the URL
  );
}
}

A: //Navigate to WebPage
navigateToWebPage() {
    this[NavigationMixin.GenerateUrl]({
        type: 'standard__webPage',
        attributes: {
            url: ''
        }
    }).then(url => {
        window.open("http://salesforce.com", "_self");
    });
}

A: You can achieve like below,
parentLWCComponent.html
Template
<template>
        <lightning-card >
            <lightning-button label="The Parent LWC" onclick={navigateToChildLWC}></lightning-button>
        </lightning-card>

</template>

parentLWCComponent.js file
import { LightningElement, api } from 'lwc';
import { NavigationMixin } from 'lightning/navigation';

export default class ParentPage extends NavigationMixin(LightningElement) {

    navigateToChildLWC() {
    this[NavigationMixin.Navigate]({
        "type": "standard__component",
        "attributes": {
            "componentName": "c__AuraComponent"
        }
    });
}

Create an aura component as below to call the child LWC component from the Parent LWC component.
AuraComponent.cmp
<aura:component  implements="lightning:isUrlAddressable" access="global" >
   <c:childLWCComponent/>
</aura:component>

Crete your child LWC component,
childLWCComponent.html
<template>

Hello World!

</template>

A: I had the same problem with NavigationMixin not replacing the current page with the navigation URL. I used JS as a workaround here, see below, it is working for me.
window.location.replace("https://www.google.com/");


text:
Q: The best approach to log total values with RRDtool? I am developing a graph system for energy consumption. The script is pulling the current Kwh of an energymeter and is then pushed to a rrd database with DS COUNTER. I have tried to use VDEF to count the total of an DEF with average but I cant seem to find a good way to make "steps" with this approach.
My goal is to to be able to fetch data for one week from database and then calculate the total of each day. I can not seem to find the best way to do this. Is RRDtool the propel way to do this? If so, what is the correct approach?

A: RRDTool works best when recording a rate.  Therefore, by using a COUNTER DS type, you can change your periodic kWh total to a point-in-time W value in the database.
For example, if you are sampling every minute, then you can multiply your kWh by 3600000 (to get Watt-seconds, or Joules) and have RRDTool use a COUNTER type to convert this to a per-second rate, or Watts (it is always better to store the data in SI units for clarity and simplicity).
You can then display or calculate this by multiplying by the step size.
For example, if you wish to see a graph of kWh used per day, you need to have a 1-day granularity RRA defined.  Then, you can fetch the data from this (either using rrdtool fetch, or rrdtool graph with a specific data granularity) and have a calculated value obtained by multiplying the average Watts by the Interval, and then dividing by 3600000 to get kWh.
This creates an RRD file with a 1-minute sample rate, to store watts.
rrdtool create power.rrd --step 60 \
  DS:watts:COUNTER:120:0: \
  RRA:AVERAGE:0.5:1:86400 \
  RRA:AVERAGE:0.5:1440:400

This will update the RRD, given your latest sample of kWh
JOULES=`expr $KWH \* 3600000`
rrdtool update power.rrd N:$JOULES

This will graph the daily usage, in kWh, over a month
rrdtool graph graph.png \
  --end now  --start "end-1month"  --step 86400 \
  --title "Power usage per day"  --vertical-label "kWh" \
  --units-exponent 0 \
  DEF:watts=power.rrd:watts:AVERAGE:step=86400 \
  CDEF:kwh=watts,STEPWIDTH,*,3600,/,1000,/ \
  VDEF:totkwh=watts,TOTAL,3600000,/ \
  GRPINT:totkwh:"Total kWh this month: %.0lf kWh"

You can, of course, modify this to your needs.  You may want different RRAs, or graphing steps, or summarisation.


text:
Q: How to print the text using a locator from the span in selenium webdriver python? I am using the selenium for UI testing. I have below inspect element of chrome browser.

      ($5,281,158)

What I tried for writing xpath.
//div[@col-id="StartBaseMV" and @class="ag-cell ag-cell-not-inline-editing ag-cell-with-height cell-number ag-cell-value"]/span[@class="ag-value-change-data"]/span[@class="ag-value-change-value"]

But, it's not working. Suggest any clue

A: As the data you want to fetch is stored as text, you can fetch it using text method like:
driver.find_element_by_class_name('ag-value-change-value').text

And if there are multiple elements with the same class name then you can use the xpath:
driver.find_element_by_xpath("//div[@col-id='StartBaseMV']//span[@class='ag-value-change-value']").text

A: You were pretty close. Presumably you are trying to extract the text ($5,281,158) and to achieve that you need to induce WebDriverWait for the visibility_of_element_located() and you can use either of the following solutions:

*

*Using CSS_SELECTOR:
print(WebDriverWait(driver, 5).until(EC.visibility_of_element_located((By.CSS_SELECTOR, "div.ag-cell.ag-cell-not-inline-editing.ag-cell-with-height.cell-number.ag-cell-value[col-id='StartBaseMV'] span.ag-value-change-value"))).get_attribute("innerHTML"))

*Using XPATH:
print(WebDriverWait(driver, 5).until(EC.visibility_of_element_located((By.XPATH, "//div[@col-id='StartBaseMV' and @class='ag-cell ag-cell-not-inline-editing ag-cell-with-height cell-number ag-cell-value']//span[@class='ag-value-change-value']"))).get_attribute("innerHTML"))

*Note : You have to add the following imports :
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions as EC

A: You want to replace this line:
//div[@col-id="StartBaseMV" and @class="ag-cell ag-cell-not-inline-editing ag-cell-with-height cell-number ag-cell-value"]/span[@class="ag-value-change-data"]/span[@class="ag-value-change-value"]

to this line:
WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.XPATH, "//div[@col-id='StartBaseMV']//span[@class='ag-value-change-value']")))

You Can Also Use Chrome Extension Chropath For Xpath Here is the link:
https://chrome.google.com/webstore/detail/chropath/ljngjbnaijcbncmcnjfhigebomdlkcjo
when you inspect and click on chropath you will see all xapths


text:
Q: Event triggering in solidity I'm currently working on ethereum platform(node.js and solidity). My question is how do I trigger an event in solidity(contract) using node.js?

A: Here is a sample event definition at smart contract:
contract Coin {
    //Your smart contract properties...

    // Sample event definition: use 'event' keyword and define the parameters
    event Sent(address from, address to, uint amount);

    function send(address receiver, uint amount) public {
        //Some code for your intended logic...

        //Call the event that will fire at browser (client-side)
        emit Sent(msg.sender, receiver, amount);
    }
}

The line event Sent(address from, address to, uint amount); declares a so-called "event" which is fired in the last line of the function send. User interfaces (as well as server applications of course) can listen for those events being fired on the blockchain without much cost. As soon as it is fired, the listener will also receive the arguments from, to and amount, which makes it easy to track transactions. In order to listen for this event, you would use.
Javascript code that will catch the event and write some message in the browser console:
Coin.Sent().watch({}, '', function(error, result) {
    if (!error) {
        console.log("Coin transfer: " + result.args.amount +
            " coins were sent from " + result.args.from +
            " to " + result.args.to + ".");
        console.log("Balances now:\n" +
            "Sender: " + Coin.balances.call(result.args.from) +
            "Receiver: " + Coin.balances.call(result.args.to));
    }
})

Ref:
http://solidity.readthedocs.io/en/develop/introduction-to-smart-contracts.html

A: Events are triggered from within functions. So, you can trigger one by calling a function that calls an event.  Here is more information: Solidity Event Documentation.

A: So basically you don't trigger the event directly throughout the node.js code.
Let's say you have solidity contract which looks like this:
contract MyContract {
    event Deposit(address indexed _from, uint256 _value);

    function deposit(uint256 value) public {
        ...
        emit Deposit(msg.sender, value);
        ...
    }
}

In order to trigger the event you have to call the deposit(uint256) function, which would look like this:
const myContract = new web3.eth.Contract(contract_abi, contract_address);

myContract.deposit("1000").send({ from: "0x..." }) // function call

And only if the transaction generated from the function call is successful and you have subscribed to this type of events you will be able to see the emitted event.

On how to subscribe to event

A: Event is triggered when you call functions of smart contract via web3.
You can just watch events in the node.js to know what happened on-chain.

A: you can refer this
 // SPDX-License-Identifier: MIT
 pragma solidity >=0.4.22 <0.8.0;
 contract EventExample {
   event DataStored(uint256 val);
   uint256 val;
   function storeData(uint256 _val) external {
         val = _val;
         emit DataStored(val);
   }
 }

A: Events allow the convenient usage of the EVM logging facilities, which in turn can be used to "call" JavaScript callbacks in the user interface of a dapp, which listen for these events, you can check here for detail

A: Add event emit to a function and than call that function. You can also use mock contract (only if necessary) in case you just use events for debugging and don't need an event in contract itself. In this case get a return from your contract function into a mock's function and than fire an event there with that return value. In JS you just need to only call mock's function and then read an event.

A: You'd have to define the event in your smart contract and have it trigger from a function in your smart contract . To trigger it through node you will have to call the function in your smart contract through web3.


text:
Q: Using Compressed Data Files (.cdf) from a Geodatabase in QGIS? I am using QGIS3 for a file geodatabase that was created on ArcMap. I can only access a few of the layers in the QGIS browser because most of them are stored using a compressed data file (.cdf). When I tried executing ogr2ogr in the OSGeo4W Shell, I got the warning message "(layer name) has a C:\Users\user\Desktop\geodatabase.gdb\compressedfilename.gdbtable.cdf file whose format is unhandled for each layer that was stored with these .cdf files.
How can I decompress/convert these .cdf files to a usable format for QGIS without access to ArcMap? Is there a solution using R?


text:
Q: Regular expression restrict the length number of stars(*) and numeric I am trying regular expression where i need to restrict  number of stars(*) and Numeric value i did like this to restrict Number of stars * /([*]*\*[^*]*){9}/ which stars(*)will restrict up to 9 now with same i need to restrict Numeric also upto 9 please help me for the same.

A: You can use
/^(?=(?:[^*]*[*]){9})(?=(?:\D*\d){9})/

The regex breakdown:

*

*^ - matches the start of the string

*(?=(?:[^*]*[*]){9}) - requires the string to have at least 9 * symbols at any locations

*(?=(?:\D*\d){9}) -  requires the string to have at least 9 digits at any locations

See the regex demo
The principles the regex is built on:

*

*Lookarounds anchored at the start (with ^) check for their subpatterns presence just once

*They do not consume characters, so each of the lookaheads checks the string from its beginning

*The opposite subpatterns are used: [^*] to check for any character but * and \D checks for a non-digit character between one another (that is, (?:[^*]*[*]){9} matches 9 sequences of zero or more characters other than * followed with one *).

To only match a string that contains up to  9 digits and stars, you need to extend the lookaheads:
/^(?=(?:[^*]*[*]){1,9}[^*]*$)(?=(?:\D*\d){1,9}\D*$)/

The negated character classes should be added at the end of each lookahead and $ should be used in order to make sure we checked the whole string up to its end. {1,9} will match 1 to 9 subpatterns the limiting quantifier is applied to.
See this regex demo

var ss = [ "12345****6789*****", "1234534****6789*****", "12345*********6789*****", "****12", "****6766", "773***666**"]; // Test strings
var rx = /^(?=(?:[^*]*[*]){1,9}[^*]*$)(?=(?:\D*\d){1,9}\D*$)/;  // The regex
for (var s = 0; s < ss.length; s++) {                       // Demo
  document.body.innerHTML += "Testing \"" + ss[s] + "\"... ";
  document.body.innerHTML += "Matched: " + rx.test(ss[s]) + "
";
}


text:
Q: Macros inside ConTeXt reference labels I want to automatically generate enumerated labels for enumerations in ConTeXt. However, I've tried the following and failed:
\definecounter[lol]
\incrementcounter[lol]\decrementcounter[lol]
\starttext
\incrementcounter[lol]
\placeformula[thm{\getnumber[lol]}]
\startformula
x^2+y^2=z^2
\stopformula
\placeformula[notatheorem]
\startformula
e^{i\pi}+1=0
\stopformula
\incrementcounter[lol]
\placeformula[thm{\getnumber[lol]}]
\startformula
\varphi = \frac{\sqrt{5}+1}{2}
\stopformula
I want to reference \in[thm1], \in[thm2] and \in[notatheorem]. Is that possible?
\stoptext

Is there any way to do it?

A: While you can refer to the counter in a way which works in references with the \rawcountervalue command there is a simpler counter mechanism which works without problem in your case.
I modified your example to use the \newcounter mechanism where you can access the value as argument for other commands without problems. The mechanism uses three main commands:

*

*\newcounter\...

*

*Create a new counter with the start value 0.

*Reset the value of the counter because there is no dedicated reset command.

*\increment\...

*

*Increment the value of the counter by 1.

*When you use braces as argument to the command you increment the counter by a specified amount, e.g. \increment(\...,3) increases the counter by 3.

*\decrement\...

*

*Decrement the counter value by 1

*When you use braces as argument to the command you decrease the counter by a specified amount, e.g. \decrement(\...,2) decreases the counter by 2.

\newcounter\LolCounter
%\increment\LolCounter
%\decrement\LolCounter

\starttext

\increment\LolCounter
\startplaceformula[reference={thm\LolCounter}]
    \startformula
        x^2+y^2=z^2
    \stopformula
\stopplaceformula

\startplaceformula[reference={notatheorem}]
    \startformula
        e^{i\pi}+1=0
    \stopformula
\stopplaceformula

\increment\LolCounter
\startplaceformula[reference={thm\LolCounter}]
    \startformula
        \varphi = \frac{\sqrt{5}+1}{2}
    \stopformula
\stopplaceformula

I want to reference \in[thm1], \in[thm2] and \in[notatheorem]. Is that possible?

\stoptext


text:
Q: Chrome type="date" and jquery ui date picker clashing I have a input box having type="date", everything works fine in IE but in latest version of Chrome it comes with a spinner, Down arrow and with a placeholder of mm/dd/yyyy.
In Chrome, on click of that field Chrome opens a datepicker and i have mapped jquery ui's datepicker for my application use. This both are clashing on them as shown below:

I have applied a fix as below:
input[type="date"]::-webkit-calendar-picker-indicator{
    display:none;
    -webkit-appearance: none;
    margin: 0;
}
input[type="date"]::-webkit-inner-spin-button {
    /* display: none; <- Crashes Chrome on hover */
    -webkit-appearance: none;
    margin: 0;
}
/** THIS DOESN'T WORK **/
input[type="date"]::-webkit-input-placeholder{
    display:none !important;
    -webkit-appearance: none !important;
        visibility: hidden !important;
}
/** THIS DOESN'T WORK **/

After adding the above code, it looks like wise:

The code above hides the spinner and arrow which fires the Chrome's date picker. But there is a problem, placeholder('mm/dd/yyyy') is still in there for the input textbox; my jquery ui's date picker is coming up fine but when i select any dates, the placeholder is still in there.
No value is setting in that input box.
Need to know how to remove that placeholder for setting the value; also the date format i am using for the application is yyyy/mm/dd.
Chrome version is : Version 27.0.1448.0
Thanks in advance!!!

A: You can just remove the type of "date" and switch it to "text" like in the following fiddle:
best of luck
jsfiddle
removeDefaultDate = function(){
    $('input[type=date]').each(function(){
        this.type="text";
    });
    $('input[type=date]').datepicker({dateFormat: 'yy-mm-dd'});
}

A: Chrome 27 now supports datepicker field types (Just like Opera already does)
You can check with modernizr.js if date field is supported. Modernizr.inputtypes.date returns true if date field is supported by browser.
The following code sets JQuery UI datepicker only if date field is not supported:
<script src="modernizr.js"></script>
<script>Modernizr.load({
  test: Modernizr.inputtypes.date,
  nope: ['http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js', 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.7/jquery-ui.min.js', 'jquery-ui.css'],
  complete: function () {
    $('input[type=date]').datepicker({
      dateFormat: 'yy-mm-dd'
    });
  }
});
</script>

Using Modernizr to detect HTML5 features and provide fallbacks

A: I handled in a tricky way, i have my date field as type="text" and i have added an attribute as data-type="date"
In jquery, i am running a code to dynamically replace type="text & data-type="date" to type="date", so the browser doesn't make it a date field on load but my jquery ui datepicker is called as i am dynamically adding it as type="date"... :)
Hope it is helpful to someone..

A: I had a similar problem. In my model/viewmodel I had specified the data type as DataType.Date
I noticed when I removed this the date picker started working in Chrome.
I think tried change the data type as DataType.DateTime and tried again in chrome.  This resolved the issue.  Not sure if this applies to anyone else but this caused me lots of headache so this might help someone.
This worked in MVC4 using jqueryUI 1.8.20

A: Google offered another way to resolve this conflict that I found helpful, at the bottom of this post.
var isDateInputSupported = function(){
  var elem = document.createElement('input');
  elem.setAttribute('type','date');
  elem.value = 'foo';
  return (elem.type == 'date' && elem.value != 'foo');
}

if (!isDateInputSupported())  // or.. !Modernizr.inputtypes.date
  $('input[type="date"]').datepicker();

A: He is what i usually use. I have a few different formats of the datepicker i use, so I don't blanket it to all date inputs. However changing the selector to what works best for you.
<script src="{YourPathHere}modernizr.js"></script>
<script>
$(function () {//DOM ready code
    if (!Modernizr.inputtypes.date) {// Check to see if HTML5 is supported to use EF data annotations, if not use jQuery datepicker
                $('.date-picker').datepicker(
                    {
                        showButtonPanel: true,
                        gotoCurrent: true,
                        changeMonth: true,
                        changeYear: true,
                        showAnim: 'slideDown'
                    }
                );
            }
});// END DOM Ready
</script>


text:
Q: azcopy errors with : 401 Server failed to authenticate the request. Please refer to the information in the www-authenticate header Using azcopy to copy files into Azure Storage Container with "Blob Service SAS URL" Shared Access Signature.
Used to work couple of days back, now it stopped working. I have generated the SAS URL multiple times with proper start and end time.
Azure Version : 10.8.0

RESPONSE Status: 401 Server failed to authenticate the request.
Please refer to the information in the www-authenticate header.
Content-Length: [302]
Content-Type: [application/xml]
Date: [Wed, 17 Feb 2021 23:44:32 GMT]
Server: [Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0]
User-Agent: [AzCopy/10.8.0 Azure-Storage/0.10 (go1.13; linux)]
Www-Authenticate: [Bearer > authorization_uri=
  https://login.microsoftonline.com/xxxxx/oauth2/authorize
  resource_id=https://storage.azure.com]
X-Ms-Client-Request-Id: [xxxxx]
X-Ms-Error-Code: [NoAuthenticationInformation]
X-Ms-Request-Id: [786b67cc-f01e-004d-1386-052f12000000]
X-Ms-Version: [2019-12-12]

Can someone please provide any workarounds?

A: Try to see this similar issue.

*

*Check your PC's time.

*Check the account key used to generate the SAS.

*Make sure your SAS token is valid.

*It's better to use the latest version of azure cli.

My test command with AzCopy v10:
$source_uri_with_sas = az storage blob generate-sas --account-key "source-account-key" --account-name "source-account-name" --container-name "source-container-name" --expiry 2022-01-01T00:00:00Z --name "source-blob-name" --permissions acdrw --full-uri

$destination_uri_with_sas = az storage blob generate-sas --account-key "destination-account-key" --account-name "destination-account-name" --container-name "destination-container-name" --expiry 2022-01-01T00:00:00Z --name "destination-blob-name" --permissions acdrw --full-uri

# Copy blob between storage accounts
azcopy copy $source_uri_with_sas $destination_uri_with_sas --recursive=true


text:
Q: Exporting whole page instead of specific Query to CSV file my goal is to create a page where after click on button I get possibility to download a CSV file which contains result of specific SQL Statement.
Here is my button:
<?php
if (Env::value('profile')){
echo "<form action='/profiles/?s=".$sys->id."&profile=".$_GET["profile"]."&submit=true' method='get' class='asholder' enctype=\"multipart/form-data\">";
    echo "<input type=\"hidden\" name=\"sys\" value=\"".$sys->id."\" />";
    echo "<input type=\"hidden\" name=\"profile\" value=\"".$_GET["profile"]."\" />";
    echo "<input type='submit' name='submit' class=\"button\" value='Generate CSV'>";
echo "</form>";
}
?>

Here is my handler:
if (isset($_GET['submit'])){

    ob_end_clean();
    $q11="select * from profile";

    dump_csv($db, $q11, 'profile');

}

and here is my method which is supposed to create CSV file:
function csv_field($s)
{
    return str_replace('"', '""', str_replace("\r","\n", iconv('UTF-8', 'Windows-1250', $s)));
}

function dump_csv($db, $q, $fname)
{
    header('Content-type: text/csv');
    header("Content-Disposition: attachment; filename=\"$fname.csv\"");
    header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
    header('Pragma: public');

    foreach ($db->query($q)->fetchall(PDO::FETCH_ASSOC) as $row) {

        if (!$first_row++) {
            foreach ($row as $key => $value)
                echo csv_field($key).";";
            echo "\n";
        }

        foreach ($row as $key => $value)
            echo csv_field($value).";";
        echo "\n";

        //var_dump($row);
        //exit;
    }
}

And yes I do have ob_start(); at the start of the page.
Problem is that instead of table with only result of the Query: select * from profile I got whole HTML code of the page in my CSV.
Can anyone point me where I am doing the mistake?
current output:
<form action='/?page=profile' method='post' class='asholder'>

person

"   name
"   mith
"
enter the name
"
"   and role of person
"
"   	"


text:
Q: C++ program is hanging when invoking 'mkfifo' (Lustre FS) I'm running the C++ program STAR (https://github.com/alexdobin/STAR) which is quite common in my field of research.
When I run this software on my server, everything goes fine.
When I run the very same software on another server (FS=lustre) the program is freezing
my command line is:
/path/to/star/STAR-2.7.1a/source/STAR --genomeDir /path/to/reference/ \
        --readFilesIn jeter1.fastq.gz jeter1.fastq.gz \
        --readFilesCommand gunzip -c  --outReadsUnmapped None --outSAMattributes All  |\
        head -n 1000

I used strace to see what's happening:
   (...)

   rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
   --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=54748, si_uid=24382, si_status=0, si_utime=0, si_stime=0} ---
   getxattr("./_STARtmp//readFilesIn.info", "security.shook_state", 0x7ffd5a10b6c0, 1024) = -1 ENODATA (No data available)
   open("./_STARtmp//readFilesIn.info", O_RDONLY) = 7
   read(7, "-rw-r-----. 1 lindenbp fg0073 10"..., 8191) = 66
   read(7, "", 8191)                       = 0
   close(7)                                = 0
   write(6, "exec > \"./_STARtmp/tmp.fifo.read"..., 82) = 82
   lseek(6, 0, SEEK_SET)                   = 0
   read(6, "exec > \"./_STARtmp/tmp.fifo.read"..., 8191) = 82
   read(6, "", 8191)                       = 0
   write(3, "-rw-r-----. 1 lindenbp fg0073 10"..., 172) = 172
   close(6)                                = 0
   chmod("./_STARtmp//readsCommand_read1", 0700) = 0
   vfork()                                 = 54750
   --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=54750, si_uid=24382, si_status=0, si_utime=0, si_stime=0} ---
   getxattr("./_STARtmp/tmp.fifo.read1", "security.shook_state", 0x7ffd5a10b6c0, 1024) = -1 ENODATA (No data available)
   open("./_STARtmp/tmp.fifo.read1", O_RDONLY ######### <= FREEZES HERE
   (...)

So I think it freezed somewhere here (?): https://github.com/alexdobin/STAR/blob/bb207df0cb62560c9194247a0480182ccbe1dca5/source/Parameters_openReadsFiles.cpp#L38 when the software create another process to gunzip -c the gzipped input files.
I also tried to use an option that specifies a tmp directory to '/tmp' but I got the same result.
What can explain this behavior and is there a way to fix it ?
Thanks

A: I got an answer from the author https://github.com/alexdobin/STAR/issues/687
The program generated a shell script that was missing a shebang delcaration: this prevented the fifo stream from working.


text:
Q: Warning: The definition depended on by in the SWC could not be found Help.
I compiled with flashdevelop a "swc" of the SVGRenderer for as3 (https://github.com/LucasLorentz/AS3SVGRenderer)
When I compile the SWC project, I don't have any issues. But when I import them in my AS3 AIR project, FlashDevelops outputs the following alerts (not errors):
C:\Users\Usuario\IlliaTV_editor\lib\SVGRenderer.swc
Warning: The definition com.lorentz.SVG.svg_internal depended on by com.lorentz.SVG.display.base.SVGElement in the SWC C:\Users\Usuario\IlliaTV_editor\lib\SVGRenderer.swc could not be found

C:\Users\Usuario\IlliaTV_editor\lib\SVGRenderer.swc
Warning: The definition com.lorentz.SVG.svg_internal depended on by com.lorentz.SVG.display.SVGTSpan in the SWC C:\Users\Usuario\IlliaTV_editor\lib\SVGRenderer.swc could not be found

C:\Users\Usuario\IlliaTV_editor\lib\SVGRenderer.swc
Warning: The definition com.lorentz.SVG.svg_internal depended on by com.lorentz.SVG.display.SVGDocument in the SWC C:\Users\Usuario\IlliaTV_editor\lib\SVGRenderer.swc could not be found

C:\Users\Usuario\IlliaTV_editor\lib\SVGRenderer.swc
Warning: The definition com.lorentz.SVG.svg_internal depended on by      com.lorentz.SVG.display.base.SVGTextContainer in the SWC       C:\Users\Usuario\IlliaTV_editor\lib\SVGRenderer.swc could not be found

I have no idea why the alerts appears. The code works fine, it loads the svg image file and show it correctly, but I don't want those alerts showing in the output console.
Thanks.

A: Changing project --> properties --> Build Path --> Link type to "merged" fixed this for me.
You then get compiler warnings, which I haven't figured out how to fix.


text:
Q: How to conduct complex operations using sympy? I am using sympy in Python 2.7. All data are complex numbers. In sympy, using I stand for j. For example, 1+2j will be transformed to 1+2I. But when I pick the complex data from sympy.Matrix to a list, the I still be I, it couldn't transformed to j. So, in a list, I got some results as follows:
[-0.00380729396990433 + (0.180207819939565 - 0.083853515413911*I)*(1.73101916117909 - 0.0151308105703527*I) + 0.00494319233978506*I, -0.00380729396990433 + (0.180207819939565 - 0.083853515413911*I)*(1.71894935222892 - 0.138744154478851*I)]

Python couldn't compute automatically. I want to know how to solve this problem, thank you!

A: As stated in the documentation,

You can also use the standard Python functions float(), complex() to convert SymPy expressions to regular Python numbers

a = [-0.00380729396990433 + (0.180207819939565 - 0.083853515413911*I)*(1.73101916117909 - 0.0151308105703527*I) + 0.00494319233978506*I, -0.00380729396990433 + (0.180207819939565 - 0.083853515413911*I)*(1.71894935222892 - 0.138744154478851*I)]
print complex(a[0])

This prints a tuple containing a standard Python complex number:
(0.306867123682-0.142935539961j)


text:
Q: Getting something Indented and I do not understand why Please consider the following LaTex code:
\documentclass[a4paper,11pt]{article}
\usepackage{amsthm}
\usepackage{amsmath}
\usepackage{array}
\usepackage{float}
\restylefloat{table}
% define the title
\title{A Math Problems}
\author{Robert~J.~Sherry}
\begin{document}
\maketitle
\noindent
Problem:
\newline
Fit a least-square line to the data given below with $x$ as the independent variable and $y$ as the dependent variable.
\newline
\begin{table}[H]
    \begin{tabular}{|l|llllll|} \hline
        x & 3 & 5 & 6 & 8 & 9 & 11  \\ \hline
        y & 2 & 3 & 4 & 6 & 5 & 8  \\ \hline
    \end{tabular}
\end{table}
Answer:
\newline
Problem:

When the above LaTex code (and I did truncate it) is rendered the line: Answer: is indented. I tired putting right before Answer: but that generated an error. I do not want the line indented. What should I do?

A: [H] assumes it comes between paragraphs. You shouldn't really ever need \newline or \noindent in a document, I would add
\usepackage{parskip}

so paragraph indention is zero and just use blank lines instead of \newline.


text:
Q: Animate custom presentation of ViewController in OS X Yosemite I want to implement new method, I searched a lot on Google and Stack Overflow but I have not found an example.
- (void)presentViewController:(NSViewController *)viewController animator:(id <NSViewControllerPresentationAnimator>)animator

this method is available in OSX 10.10 and this method need to implement the protocol NSViewControllerPresentationAnimator which has these two methods
- (void)animatePresentationOfViewController:(NSViewController *)viewController fromViewController:(NSViewController *)fromViewController

- (void)animateDismissalOfViewController:(NSViewController *)viewController fromViewController:(NSViewController *)fromViewController

These methods allow us to do custom animation between two NSViewController's
I need an example of implementation, I have this code:
- (IBAction)openTask:(id)sender {

    NSStoryboard *storyboard = [NSStoryboard storyboardWithName:@"Main" bundle:[NSBundle mainBundle]];
    Tasks *task = [storyboard instantiateControllerWithIdentifier:@"tasks"];
    [self presentViewController:task animator:self];

}

- (void)animatePresentationOfViewController:(NSViewController *)viewController
                         fromViewController:(NSViewController *)fromViewController
{

}

- (void)animateDismissalOfViewController:(NSViewController *)viewController
                      fromViewController:(NSViewController *)fromViewController
{

}

Can anyone help me with an example of how I could have implemented this transition?

A: Here is a simple version (Swift) that fades in the new viewcontroller's view.
I am sure you can translate that into Objective-C.
You will want to actually use Autolayout instead of just changing the frame, but that would have made the example a bit longer (not too difficult. Just add constraints after you add the view)
I am not sure if you need viewcontroller containment as well. Then there would need to be the appropriate calls to addChildViewController and so on. Maybe someone can shed some light on when this might be necessary or if it is actually good practice in any case.
class MyTransitionAnimator: NSObject, NSViewControllerPresentationAnimator {

    func animatePresentationOfViewController(viewController: NSViewController, fromViewController: NSViewController) {

        let bottomVC = fromViewController
        let topVC = viewController

        // make sure the view has a CA layer for smooth animation
        topVC.view.wantsLayer = true

        // set redraw policy
        topVC.view.layerContentsRedrawPolicy = .OnSetNeedsDisplay

        // start out invisible
        topVC.view.alphaValue = 0

        // add view of presented viewcontroller
        bottomVC.view.addSubview(topVC.view)

        // adjust size
        topVC.view.frame = bottomVC.view.frame

        // Do some CoreAnimation stuff to present view
        NSAnimationContext.runAnimationGroup({ (context) -> Void in

            // fade duration
            context.duration = 2
            // animate to alpha 1
            topVC.view.animator().alphaValue = 1

        }, completionHandler: nil)

    }

    func animateDismissalOfViewController(viewController: NSViewController, fromViewController: NSViewController) {

        let bottomVC = fromViewController
        let topVC = viewController

        // make sure the view has a CA layer for smooth animation
        topVC.view.wantsLayer = true

        // set redraw policy
        topVC.view.layerContentsRedrawPolicy = .OnSetNeedsDisplay

        // Do some CoreAnimation stuff to present view
        NSAnimationContext.runAnimationGroup({ (context) -> Void in

            // fade duration
            context.duration = 2
            // animate view to alpha 0
            topVC.view.animator().alphaValue = 0

        }, completionHandler: {

            // remove view
            topVC.view.removeFromSuperview()
        })

    }
}

Hope this gets you started!


text:
Q: How to overlay an image in a for loop in Django I'm trying to create an event page where admin can post events which will be edited or deleted from time to time. The idea is there are in cards and when the user  click on the cards an image overlay will show up.
While in the past I have used HTML and JavaScript to create this overlay my problem now using a for loop in python. This is my code:

                {% for festival in festivals %}

{{ festival.name }}

{{ festival.description }}

                            <button onclick="on()">Turn on overlay effect</button>

                {% endfor %}

Any suggestion will be appreciated
Thank you
I forget to say that my problem is not showing the overlay but it will only shows the first image, no matter which card I click on.
The code for JavaScript.
function on() {
  document.getElementById("overlay").style.display = "block";
}

function off() {
  document.getElementById("overlay").style.display = "none";
}

A: Got to realised the error was i had the ID inside a loop creating more than one div with the same ID plus i was trying to use JavaScript within python loop.
So the solution I thought is to create a separate page for each card every time I click in the image and have a plain overlay outside the loop with the image clicked

                {% for festival in festivals %}

{{ festival.name }}

{{ festival.description }}

                {% endfor %}

And the url will be
path('<int:festival_id>/', views.festival_detail, name='festival_detail'),

the view.py
def festival_detail(request, festival_id):
"""
A view to show individual festivals images
"""
festival = get_object_or_404(Festival, pk=festival_id)
festivals = Festival.objects.all()

context = {
    'festival': festival,
    'festivals': festivals
}

return render(request, 'festivals/festival_detail.html', context)


text:
Q: When to Create DB and When to Create Schema This seems a design question but I wanted to know if there is a pattern or design consideration we need to have where we would want to create a Database and not a new schema.
why not create one big database and separate schemas. Under what circumstance should we create a new database.

A: They are just logical divisions, so for the most part it's a matter of preference. There is one place where it's not a matter of preference: replication.
As of September, 2022, the unit of replication is the database. It's possible to specify which databases you want to replicate, but not which schemas within a database to replicate.
If you plan to replicate, you'll want to think about keeping only the schemas/tables that are important to replicate in one or more databases that get replicated and keep other data in databases that do not get replicated.

A: Another thought could be, In a large DWH Enterprise Solution,
There can be variety of flavours of tables which You can map to different databases. Sales DB, Master DB, Finance DB for ex. Then Inside DBs, You may want to have schemas for tables, views ,procedures and other object .


text:
Q: Rails 3 app works, integration test fails: how to fix cookie issue? I have a simple Rails 3 app: no models, one view and one controller with a single index method which produces static content.  It works fine: when I manually browse to '/' I see my static content.
Then I added an integration test:
# myproj/test/integration/routes_test.rb
class RoutesTest < ActionController::IntegrationTest
  test 'default_route' do
    get '/'
    assert_response :success, @response.body
  end
end

When running this test via rake, it tells me that GET '/' is responding with 500.  Examination of the log output reveals this message in the response body:
A secret is required to generate an integrity hash for cookie session
data. Use config.secret_token = "some secret phrase of at least 30
characters" in config/initializers/secret_token.rb
Of course secret_token.rb exists and contains a properly formatted secret (it was generated by Rails 3 itself.)
Anyone out there know how to enable integration testing in Rails 3?  I'm guessing perhaps I need to set some other configuration options to tell my app to accept integration tests.

A: You need to include the Rails-generated file test_helper.rb.  This contains the magic necessary to allow integration testing.
In your test file(s), prepend the line:
require File.join( File.dirname( __FILE__ ), '../test_helper.rb' )

The path '../test_helper.rb' above should be relative to the test file that includes it.
FYI: The above is a Ruby idiom for including files by with relative paths (like #include "../foo.h" in C.)  If you're using Ruby 1.9.x, you can use a simpler form:
require_relative '../test_helper.rb'


text:
Q: Tool for generating html post page to bypass JS validation and test sql injection I would like a tool (or firefox) that enumerates all ,  elements on an target HTML page and generates a new HTML page which I can use to post to the original page.
I want to use this for security / sql injection testing, to circumvent any JavaScript validations.
The Web Developer firefox plugin is close, but it doesn't let me change the values of radiobutton elements.

A: If you're doing SQL injection testing, you should be sending the POST requests directly, not using a web form. It's easier to automate testing and covers a greater range of attack vectors... Plus, that's what the crackers will be doing, anyway.
Edit: a great compromise between the two ways is Fiddler: http://www.fiddler2.com/fiddler2/ ... You can submit via the web form (with JS disabled) and then edit the outgoing traffic to try to break your SQL injection.

A: You shouldn't be using Javascript as a form of security. Validations via JS should only be used to improve the user's experience. Therefore, SQL injection protection should be occurring server-side with parameterized queries.
To edit values, you could use FireBug to test any Javascript/input.
EDIT: You could also use Tamper Data. Easy to use add-on which lets you change any of the POST parameters quickly.

A: Selenium is great for this kind of web UI testing.

A: The easiest way to do this is to use Firebug to edit the DOM.
You can use the Web Dev Toolbar to disable Javascript, and you can use Firebug's HTML view to edit attribute values in real time.
In general, Firebug is an excellent tool for web developers and designers and I (and many other people) highly recommend it.

A: I think the simplest way to do this is not to use forms at all. You can run Fiddler during a normal request and you will see your POST request occur.
You can then replay and modify that request using Fiddler's 'Request Builder' (drag the actual request onto the 'Request Builder' tab and it will clone the request.) This allows you to create whatever bad inputs you wish without worrying about generating new forms to handle this.

A: Tamper Data https://addons.mozilla.org/en-US/firefox/addon/966 - does HTTP header modification too.