API JSON apison exportacion cabecera 404 500 error errores

# Hacer que una función retorne un json público
Si estamos haciendo una API, puede ser que queramos retornar un JSON. Para ello haremos una función normal, en QUID, solo tendremos en cuenta estas cosas:

* **Agregar la función al "Espacio Exportación"** (config_app.php en espacios/exportacion)
* Establecer el header del **Content-type** de la respuesta JSON: 
```php
header('Content-Type: application/json');
``` 
* Tener en cuenta que la función quizás puede retornar **códigos de error**, esto se

Esempio autocomplete in ajax (Wordpress)

http://dev.networksail.com/
				<form id="headerHomeForm" action="<?php echo get_post_type_archive_link('barca'); ?>" method="post">
					<div class="container-fluid container-xxl">
						<div class="row">
							<div class="col-12 col-lg-10 mx-auto">
								<div class="row gx-3 gy-3 gy-lg-0 formWrapper">
									<div class="col-12 col-lg-3 col-xxl-4 position-relative">
										<label for="porto_text" class="w-100">
											<input name="porto" id="porto" type="hidden">
											<input name="porto_text" aut

memcached key 조회

First, Telnet to your server:

telnet 127.0.0.1 11211
Next, list the items to get the slab ids:

stats items
STAT items:3:number 1
STAT items:3:age 498
STAT items:22:number 1
STAT items:22:age 498
END
The first number after ‘items’ is the slab id. Request a cache dump for each slab id, with a limit for the max number of keys to dump:

stats cachedump 3 100
ITEM views.decorators.cache.cache_header..cc7d9 [6 b; 1256056128 s]
END

stats cachedump 22 100
ITEM views.decorators.cache.cache_page..8427e

Lieferantenbestellung öffnen SP

Ändert den Status einer Lieferantebestellung. Dadurch lässt sich eine Abgeschlossene Bestellung wieder bearbeiten. kLieferantenbestellung muss einfach als Ganzzahl eingetragen werden.
DECLARE @RC int
DECLARE @kLieferantenBestellung int
DECLARE @nStatus int

EXECUTE @RC = [Lieferantenbestellung].[spLieferantenBestellungStatusAendern] 
   @kLieferantenBestellung = [KLIEFERANTENBESTELLUNG]
  ,@nStatus = 20 /* 20 = in Bearbeitung, 500 = Abgeschlossen */
GO

Django get url parameters and pass to link or pagination

Use case: If you are using url parameters to filter result, it must carry the parameter to next pagination link
{% load custom_filters %}

<a href="?{% query_transform page=records.previous_page_number %}" class="relative inline-flex items-center rounded-l-md px-2 py-2 text-gray-400 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:z-20 focus:outline-offset-0">
    <span class="sr-only">Previous</span>
</a>

HTMX after request trigger another HTMX request

example use case: after polling get how many pending article left, once it become zero, trigger event to ask article list to get latest data
<div 
    hx-get="/api/v1/pending_articles_count"
    hx-trigger="every 10s"
    hx-select="#pending_articles_count_content"
    hx-target="this"
    hx-on::after-request="pendingArticlesCountAfterRequest(event)"
class="header-menu">
    <!--do something-->
</div>

[AW Blog] Asset Allocation and Risk Allocation

While not guaranteed, a well-balanced portfolio may be better at handling market risk.
<p>With current market instability, inflation, and rising interest rates, more people are becoming acutely aware of the risks of investing. Financial markets are commonly known for their up-and-down nature, also known as market risk. Some people go into the market with higher expectations than others, but those expectations often come with an equal amount of risk. Others have a lower tolerance for risk and are more comfortable with the possibility of lower returns. But, regardless of risk tolera

[AW Blog] Divorce and Retirement: Here’s What You Need to Know

While divorce may be hard on your emotional wellbeing, you shouldn’t let it impact your retirement plans.
<p>Divorce is never an easy experience, whether you’ve been married for decades or just a few years. Negotiating a divorce settlement can be complicated by lingering emotions, custody battles, and difficult division of assets. But while divorce may be hard on your emotional wellbeing and your wallet, you shouldn’t let it impact your retirement plans.</p>
<p><strong>Here’s what you need to know about how divorce can affect retirement security.</strong></p>
<h3 class="mt2">Retirement Savings Plans

Two buttons above the nav (w/ sticky header)

<div class="above-the-nav-container">
    <a class="button outline" href="https://myaccountviewonline.com/login/" target="_blank" title="LPL Account View">Account View</a>
    <a class="button outline" href="https://go.oncehub.com/" target="_blank" title="Book a Meeting with Your Advisor">Book a Meeting</a>
</div>

<style>
/* Above The Nav */
.above-the-nav .above-the-nav-container {
    display: flex;
}
.above-the-nav .above-the-nav-container .button {
    margin: 0;
}
@media screen and (min-wi

861. Score After Flipping Matrix

You are given an m x n binary matrix grid. A move consists of choosing any row or column and toggling each value in that row or column (i.e., changing all 0's to 1's, and all 1's to 0's). Every row of the matrix is interpreted as a binary number, and the score of the matrix is the sum of these numbers. Return the highest possible score after making any number of moves (including zero moves).
/**
 * @param {number[][]} grid
 * @return {number}
 */
var matrixScore = function(grid) {
    // The number of rows in the grid
    let m = grid.length;
    // The number of columns in the grid
    let n = grid[0].length;

    // The main idea is to make most significant bit of each row as 1 by flipping the rows
    // Then, we flip the columns where the number of 0's is more than the number of 1's

    // First, we flip the rows where the most significant bit is 0
    for (let i = 0; i < m; i+

randomly sample rows from pandas

sampled_df = df.sample(n=20, random_state=42)
for idx, row in sampled_df.iterrows():
    # Do something with the row
    print(idx, row)

Cypress Snippets

npm i cypress --save-dev [Installation]
npx cypress open [Open and configure]

[Basic Test]
describe('template spec', () =>{
  it('passses a test', () => {
    cy.visit('https://example.url.com')
    cy.get('[date-test="some-name"]').conains(/Som Text/i)
  })
})


String Array Sorting

import java.util.*;

public class ArrStringSort {
    public static void main(String[] args) {
        String str[] = {"John", "Jill", "James", "Adam", "Jack", "Joanie", "Jim"};
        
        System.out.println(Arrays.toString(str));
        
        //sort the array
        for (int i = 0; i < str.length; i++) {
            for (int j = 0; j < str.length-1; j++) {
                if (str[j].compareTo(str[j+1]) > 0){
                    String tmp = str[j];
                    st

Array Sorting

import java.util.*;

public class ArrSorting {
    public static void main(String[] args) {
        int arr[] = {3, 6, 8, 1, 5, 2, 6, 7};
        
        System.out.println(Arrays.toString(arr));
        
        int size = arr.length;
        
        // loop to access each pass
        for (int i = 0; i < size; i++) {
            // loop to access each array element
            for (int j = 0; j < size-1; j++) {
                // compare two adjacent elements
                /

Guessing Game

package howells;

public class NumberCheck {
    private int random;
   
    public void generateNumber(){
        random = (int)(Math.random() * 101);
    }
   
    public int checkGuess(int guess){
        if (guess < random) return 1;
        else if (guess > random) return 2;
        else return 0;
    }
}

//MainUI**************************************************

import javax.swing.*;

public class GuessingGame {
    public static void main(String[] args) {
        N

Convert Vue component to Web component

<!-- ce je jen interni oznaceni ze to bude custom element = web component -->
<script setup>
defineProps({
  msg: {
    type: String,
    required: true,
    default: 'AAA'
  }
})
</script>

<template>
  <div>{{ msg }}</div>
</template>

<style scoped>
h1 {
  font-weight: 500;
  font-size: 2.6rem;
  position: relative;
  top: -10px;
}

h3 {
  font-size: 1.2rem;
}

.greetings h1,
.greetings h3 {
  text-align: center;
}

@media (min-width: 1024px) {
  .greetings h1,
  .greetings h3 {
    text-alig