redirect_uri que no sea localhost
2. URI de redireccionamiento Autorizados, si tu tipo de aplicación es web verás esta sección, para un script de Colab, es probable que esto sea incorrecto, al cambiar el tipo a Aplicación de Escritorio. Google gestionará correctamente la dirección al localhost automáticamente. Si es absolutamente necesario usar el tipo Aplicación Web, deberás agregar: Http//localhost:8080 " o cualquier puerto que tu servidor local esté configurado para usar.Si haz comprobado esta configuración y sigues teniendo problemas, obtendrás la mejor ayuda haciendo una pregunta detallada en lugar como los foros oficiales de soporte de la API de Google Ads
You're getting the error because \
in strings can create escape sequences. Fix it by using a raw string or double backslashes:
file = open(f"files\\{filename}", "w")
or
file = open(rf"files\{filename}", "w")
Also, ensure the files
folder actually exists before running the code.
This issue has been resolved. I had to override below mentioned of the Open API templates:
dataClass.mustache
modelMutable.mustache
(t:=lambda v:v and((yield v%100),(yield from t(v//100))))
print(*t(12345))
print(list(t(12345678))[::-1])
You can also achieve the intended output using the formula below
Formula
=SUM(FILTER(D1:D, E1:E="YES"))
Sample Input
D | E |
---|---|
2 | Yes |
8 | No |
10 | Yes |
Output
Output |
---|
15 |
References:
You just need to add sync=true to you annotation. After all, your method is synchronized.
@Cacheable(value = "provider", key = "#providerId", sync = true)
No, currently Redash doesn't support this feature.
Reference: https://github.com/getredash/redash/issues/7052
The connection strings(url and api key) are still required to get access to your database tables,turning off the RLS for a given table means that anyone who is connected to your db can get access to those tables and modify their content,supabase will not apply any restriction as long as the user his connected to the database.
test('on paste should autofill', async ({ page, context }) => {
// grant access to clipboard (you can also set this in the playwright.config.ts file)
await context.grantPermissions(['clipboard-read', 'clipboard-write']);
// focus on the input
await page.locator('input').focus();
// copy text to clipboard
await page.evaluate(() => navigator.clipboard.writeText('123'));
// Get clipboard content
const handle = await page.evaluateHandle(() => navigator.clipboard.readText());
const clipboardContent = await handle.jsonValue();
// paste text from clipboard
await page.locator(first).press('Meta+v');
// check if the input has the value
await expect(page.locator(input)).toHaveValue('123');
});
Taken from: https://www.adebayosegun.com/snippets/copy-paste-playwright
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
// https://vite.dev/config/
export default defineConfig({
plugins: [react()],
server:{
port:3001,
cors:true
}
})
We ran into this issue too. In our case, it was caused by a duplicate folder name in the .git/refs/remotes/origin directory. When a new branch was created, the folder path was given with an uppercase starting letter, which resulted in a duplicate folder on a case-insensitive file system (like Windows). Once we removed the conflicting folder, the issue was resolved.
Delete the folder through website and did "git remote prune origin" as suggested in this thread. Then fetch and pull from VS works fine.
Considering follow codes
template<typename T>
struct Rx {
T* ipc;
operator T*() const {
return ipc; // implicit conversion to T*
}
};
struct IPC {
void doSomething();
};
struct Bundle {
Rx<IPC> rx1;
};
There are cases that is not easy to distinguish when you are using object of Rx or when you are using dereferencing of it
It seems that I need to add the following import to the head tag:
<script src="CAN-3-3-0/index.js"></script>
Then access to my website via localhost/hello_word
or localhost:3001
simply using the native http server of Canonicaljs (CAN)
Turns out that when I run form_full_data
on the cloud the rows are returned in a different order than when I run it on my local machine. This is easily fixed by an additional sort command.
I ran into the same issue, and after some digging, I realized it was caused by a mismatch between the DFM and CPP files. Somebady had updated the CPP file and removed some controls, but forgot to update the DFM. So the DFM was referencing objects that no longer existed in the code.
Lesson learned — and hopefully this helps someone else avoid the same headache.
By the way, this thread is older than my daughter!
Figured it out - had to add a Search Index Data Reader assignment to my search service for my user account (even though this is never mentioned in the tutorial, and my user account is the subscription admin).
Having the same issue on a legacy HPC cluster which running CentOS 7. This problem can be fixed by compiling a newer version of binutils
and add bin to the PATH
.
I got it.
Use this api:
tizen.systeminfo.getCapability("http://tizen.org/feature/platform.version")
Since I can't leave a comment, I'm posting my question here.
I tried using:
await Future.delayed(Duration(milliseconds: 1000));
However, some users still can't see the JS file being loaded.
Should I try increasing the delay time?
Have you found any other solution that works more reliably?
According to this link, 50 lines of code modification is all that is needed.
I have not tried it. Maybe it will work?
If someone still wants to solve this (like me), please check out https://learn.microsoft.com/en-us/azure/azure-app-configuration/quickstart-azure-functions-csharp?tabs=entra-id#manage-trigger-parameters-with-app-configuration-references
I had to be really explicit with this. source.orgainizeImports was not enough.
Cursor was not prioritising my eslint-plugin-import rules and using Typescripts imports.
"editor.codeActionsOnSave": {
"source.organizeImports.sortImports": "never",
"source.fixAll.eslint": "explicit",
},
In my case services.msc was opened in another user's session.
Install-PackageProvider -Name NuGet -Force | Out-Null
Install-Module -Name Microsoft.WinGet.Client -Force -Repository PSGallery | Out-Null
Repair-WinGetPackageManager
Using the Mapbox Map's A.I. assistant I managed to workout I was omitting something in my code.
So turns out, to externalize the unnecessary modules in Sequelize, I have to explicitly mention in inside the electron()
block, rather than the top level scope in defineConfig
. I was under the impression writing it in the top level scope would apply to both the main as well as the renderer process but guess not. It only applied to the renderer process I believe. Better to explicitly mention inside the main process of electron()
.
Small programs that are non recursive (functions call themselves), shouldn't really cause problems, but check your resources in any case esp while compiling (number of cpus used, memory). Using recent compiler especially of recent revisions and stable compilers. Recent versions .. Sometimes better, sometimes worse. Be sure you are using correct architecture if you sometimes cross compile, or use distributed compiling if you use different computers. Using basic setups is best for testing.. like 1 cpu on local machine, but might decrease speed. Some of things are advanced users, so might not even be relevant, but use simple test cases.
This was fixed earlier today so you should be able to install the development version of terra.
Por qué me aparecen en mi correo _000_MN2PR18MB3590665D26F28FDAC53105ED8B70AMN2PR18MB3590namp_
@Shrotter I am also facing similar issue- Issue
I want reference to the part from instance - shown in red block.
From above answer, I get oSel.Count2 = 0.
if TypeName(oProductdocument) = "ProductDocument" then
'Search for products in active node
oSel.Search "CATAsmSearch.Product,in"
if oSel.Count2 <> 0 then
'first selected product is the active node
Set oActiveProduct = oSel.Item2(1).LeafProduct
Thanks in advance
I found a solution, I think. It doesn't exactly give me what I want, but it's a great start and I no longer feel stuck.
I made an empty game object, and attached a script to it that contains LineRenderer and Mesh.
Here is the code below I have now
using UnityEngine;
/* Ensures that the attached GameObject has a MeshFilter and MeshRenderer component.
* Unity automatically generates one if not.*/
[RequireComponent(typeof(MeshFilter), typeof(MeshRenderer))]
public class ProceduralPlanet : MonoBehaviour
{
/* Number of points around the circle.
* Increasing the number makes it smoother and increases resolution */
public int segments = 1000;
/* The radius of the object */
public float baseRadius = 50f;
/* Controls the scale of the Perlin noise applied to the radius */
public float noiseScale = 4f;
/* Controls the amplitude of the Perlin noise applied to the radius */
public float noiseAmplitude = 0.05f;
private void Start()
{
/* Takes the attached MeshFilter, creates a mesh object, and names it */
MeshFilter meshFilter = GetComponent<MeshFilter>();
Mesh mesh = new Mesh();
mesh.name = "Procedural Planet";
/* Create arrays for vertices and triangles.
* Vertices will hold the positions of the points in 3D space,
* Triangles will define how these points are connected to form the mesh */
Vector3[] vertices = new Vector3[segments + 2]; // center + edge points
int[] triangles = new int[segments * 3]; // 3 per triangle (center + 2 edge points)
/* Center of the planet */
vertices[0] = Vector3.zero; // center point of planet
for (int i = 0; i <= segments; i++)
{
/* Goes around to create a circle*/
float angle = (float)i / segments * Mathf.PI * 2f;
// Calculate unit vector for the current angle
float xUnit = Mathf.Cos(angle);
float yUnit = Mathf.Sin(angle);
// Apply Perlin noise
float noise = Mathf.PerlinNoise(xUnit * noiseScale + 100f, yUnit * noiseScale + 100f);
// Calculate the radius with noise applied
float radius = baseRadius + (noise - 0.5f) * 2f * noiseAmplitude;
// Set the vertex position
vertices[i + 1] = new Vector3(xUnit, yUnit, 0) * radius;
// Create triangles (except on last iteration)
if (i < segments)
{
// Each triangle consists of the center and two consecutive edge points
int start = i * 3;
triangles[start] = 0; // center
triangles[start + 1] = i + 1;
triangles[start + 2] = i + 2;
}
}
// Handle the last triangle to close the circle
mesh.vertices = vertices;
// The last triangle connects the last edge point back to the first edge point
mesh.triangles = triangles;
// Calculate normals and bounds for lighting and rendering
mesh.RecalculateNormals();
mesh.RecalculateBounds();
// Assign the mesh to the MeshFilter
meshFilter.mesh = mesh;
}
}
I'll make this a community wiki, so anyone is free to edit and help other people. Have no idea why the syntax isn't highlighting though.
I have just stumbled upon a better work round for this problem - https://lore.kernel.org/linux-arm-kernel/[email protected]/ - the arch/arm/Makefile can be modified to remove all the cc-option commands that modify the architecture specific and tuning specific compiler options!
I presume that the out of tree module build does not for some reason use the arch/arm/Makefile whilst my in-tree module build uses the Makefile an so has the build problem with gcc v11 and above.
You'll need to completely master LOD in game engines.
Unity's tutorials are staggeringly bad, but you can easily find them https://learn.unity.com/tutorial/working-with-lods-2019-3#
https://docs.unity3d.com/2023.1/Documentation/Manual/LevelOfDetail.html
You can also easily find literally thousands of tutorials on LOD concepts all over the place. Here's a random one I googled up for you
https://www.youtube.com/watch?v=IIUQE90-gFY
best of luck!
What do you want to test?
If the answer is that you want to test that your code interacts with gatttool in the way you expect, then just try it.
If the answer is that you want to test whether you're using pexpect correctly, then I suggest that you write an external program that just records what you send to it and replies with some text that you expect (probably the responses expected from gatttool). Then run that instead of gatttool in your tests. For example, you can make your connect
function accept parameters for the strings to pass to pexpect functions - different things for your external test program or for gatttool.
Even if you are using pexpect correctly and you can successfully interact with gatttool, you should consider what happens if gatttool responds in an unexpected way. Your connection to it might drop, or it might respond in a different way to normal. A test external program would also let you test that something sensible happens in those cases.
Solved.
Solution was to set transformMixedEsModules: true
in the build section of the vite.config.js
build: {
commonjsOptions: {
transformMixedEsModules: true,
},
Turns out this was a compiler bug in the version of Clang I was using.
You can see in this godbolt example how the minimally reproducible example compiles in Clang 20.1.0 but not Clang 19.1.10.
The issue was caused by having the code contained in a template inside a module.
I am facing the same error. I found that the Player script, which we are using, is attached to both Player and Player Visual. Turn off that script in Player Visual, and you will be good to go!! This worked for me!!
If someone asked me how to match drivers and passengers at Uber scale using only a relational database, I would acknowledge that it's quite challenging, but here's a straightforward way I would tackle it:
Think Spatially: First off, relational databases aren't designed for this kind of real-time, geospatial matching. But if we have to, we'd likely divide the cities into manageable zones or grids (using geohashing or a similar approach) to make querying and updating locations more feasible.
Index Smartly: In terms of indexing, we'd want to create indices on these spatial zones and possibly on timestamps to find who's where and when quickly. However, too many indices could slow things down because of the constant updates, so we'd have to be selective and smart about it.
Periodic Polling for Matching: Since we're constrained by periodic polling, we could set up a background job to run at intervals. It would pull the latest driver locations and match them with waiting passengers, kind of like "batch matchmaking." This won't be as fast as real-time matching, but it's workable.
Handle High Traffic Areas: For busy areas like urban cities, we might need to run this matching process more frequently and possibly use smaller grid sizes to get more precise matches without overloading the system.
Race Condition Management: To prevent issues like race conditions, especially when several matches are happening at once, we might need to use some form of transaction isolation. However, that could slow down the system, so we'd need to balance our safeguards with performance.
EF Core 9.0 Stills with this anoying issue!
My connection string is right, and it stills failing trying to check the pending migrations, a 'easy'task in theory. The database already exists but stills trying to create a new one and throws an exception. But in local environment works, the problem is when the app (in a docker image) is deployed to a remote VPS.
public static IApplicationBuilder RunDbMigrations(this IApplicationBuilder app)
{
using (var scope = app.ApplicationServices.CreateScope())
{
var dbMaster = scope.ServiceProvider.GetRequiredService<MasterDbContext>();
var pendingMigrations = dbMaster.Database.GetPendingMigrations(); // IT DOESN'T WORK
string cs = dbMaster.Database.GetConnectionString();
Console.WriteLine(!string.IsNullOrWhiteSpace(cs) ? $"Usando DB: {cs}" : "SIN CONEXION");
if (!pendingMigrations.Any())
{
Console.WriteLine("No hay migraciones pendientes...");
return app;
}
try
{
Console.WriteLine($"Aplicando migrations...");
dbMaster.Database.Migrate();
}
catch (Exception ex)
{
Console.WriteLine($"Error al aplicar migraciones!: {ex.Message}");
throw;
}
return app;
}
}
RunDbMigrations is called from program.cs after build line:
// Configure the HTTP request pipeline.
if (app.Environment.IsDevelopment())
{
app.MapOpenApi();
app.UseCors("Development"); // Enable CORS in development
}
// DB Migrations:
app.RunDbMigrations();
// http requests custom logging:
app.UseHttpRequestsLogging();
Please help!
I have a billion dollars worth of cryptocurrency and I want all of it now find it now with my social security number my name my face my ID I want my money now if I'm at my wallet now
It started to happen for me recently after a few Windows 11 updates. For me the fix was to call this in shell:
wsl.exe --install --no-distribution
Uber developed H3 as a spatial indexing library to divide the Earth into hexagonal cells of various resolutions.
Replaces geohash or lat/lon-based grids.
Used to:
Index driver/rider positions
Do proximity lookups (e.g., find nearby drivers in adjacent hexes)
Heatmaps, demand prediction, surge pricing
Uber built a custom sharded database layer called Schemaless on top of MySQL.
Used for storing structured data at large scale, including location metadata.
Includes sharding logic, retry mechanisms, async updates.
Used for streaming location updates from devices (drivers and riders) to backend services.
Decouples write-heavy location updates from the read services.
For real-time analytics and processing of location data.
Supports pricing, surge detection, ETA predictions.
For fast, in-memory lookups like driver availability in a specific H3 zone.
Often used to avoid querying persistent storage for every request.
Uber has used both for storing time-series location data.
Suitable for high write throughput and scalable reads.
A gossip-based library created by Uber for service discovery and sharded coordination.
Location service instances are distributed and self-organizing.
Uber’s Kafka pipeline replication framework used for global data replication.
Helps Uber sync location data across regions and clusters.
You cannot use a slicer directly as a chart axis in Excel. This is because Slicers are designed to filter data in pivot tables or pivot charts, but not as axis labels.
So, an alternative can be to:
a) create a pivot table, b) insert a pivot chart based on this pivot table, c) add a slicer connected to the pivot table.
The slicer won't become an axis, but it will filter the data.
Hope this helps.
new XMLSerializer().serializeToString(document.doctype)+'\n'+document.documentElement.outerHTML
this works as it pulls the doctype string then adds the outer HTML
No, there is no difference. Both extensions will work.
I was having the same issue, but was never prompted to create a password when I installed pgadmin. Despite this eo_coder_jk's answer worked for me.
It seems that JetBrains members posted an article how to fix this error code here:
https://youtrack.jetbrains.com/articles/SUPPORT-A-1853/Junie-provides-error-code-400-input-length-and-maxtokens-exceed-context-limit
The iterator object of the built-in iterable data types is itself iterable. (That is, it has a method with the symbolic name Symbol.iterator, which simply returns the object itself.) Sometimes this is useful in the following code when you want to run through a “partially used” iterator:
let list = [l,2,3,4,5];
let iter = list[Symbol.iterator]();
let head = iter.next().value; // head == 1
let tail = [...iter]; // tail == [2,3,4,5]
JavaScript: The Definitive Guide, David Flanagan, page 363
Looks like my prior searches didn't give the answer I was looking for.
It looks like main.cpp symbols weren't being exposed to shared libraries, so it was getting tripped up.
Compiling with g++ -rdynamic -I./lib main.cpp -o game
worked as expected.
I was able to fix the issue by changing the host property from
host:"localhost",
to
host:"127.0.0.1",
At that point the Environment would be ready to use, even if beans are not created yet.
So you can inject the Environment
into your class, then execute the old environment.getProperty("my.property")
method.
How about encoding the length-info explicitly, in a static constexpr variable?
struct mybits {
static constexpr size_t num_bits = 15;
unsigned int one:num_bits;
};
webview_flutter version 4.13.0 has support for SSL error handling via NavigationDelegate(onSSlAuthError)
webview_flutter version 4.13.0 has support for SSL error handling via NavigationDelegate(onSSlAuthError)
If your Power BI reports using DirectQuery to a MySQL database are not refreshing automatically on the Power BI Service, it's likely due to missing or misconfigured gateway settings. Unlike Import mode, DirectQuery requires an on-premises data gateway to maintain a live connection between the Power BI Service and your local or private database. Without a properly installed and configured gateway, the service cannot query your MySQL source in real time or on schedule, which explains why refreshes fail and only work manually in Power BI Desktop. To resolve this, install the on-premises data gateway, configure it in the Power BI Service under "Manage Gateways," ensure the data source credentials are valid, and map your dataset to use this gateway. Once set up correctly, your reports should refresh automatically or on-demand without needing manual intervention from Desktop.
On the GitLab feature request mentioned by @Jonathan, kawadumax posted a nice solution leveraging Just's ability to have embedded Bash that is essentially:
#!/bin/bash -eu
command1 &
command2 &
trap 'kill $(jobs -pr)' EXIT
wait
Sorry for late answer, but you could use this gist on Github, it should solve validation issue without any problem. Hope this helps you or anyone who sees this.
the scope photoslibrary.readonly
、photoslibrary
has been deprecated and will be removed after March 31, 2025.
After this date, any API calls using only this scope will return a 403 PERMISSION_DENIED error.
What should you do?
For reading photos, use the https://www.googleapis.com/auth/photoslibrary.readonly.appcreateddata scope.
For other use cases, review the latest Google Photos API documentation for supported scopes and migration instructions.
Reference:
https://developers.google.com/photos/support/updates#affected-scopes-methods
If there is anyone that has the problem of not showing suggestions in html and not showing open with live server option, just go to preferences in settings, click on edit json file. Paste this:
"files.associations": {
"*.html": "html"
}
Reactive base environment
conda activate base
Ensure extensions work
jupyter nbextension enable --py widgetsnbextension
jupyter nbextension enable --py ipympl
restart your PC.
re-run
jupyter notebook
In notebook, Kernel --> restart and clear ouput, Run all cells.
The PC actually contains, only the address of the next instruction. It does not contain the actual instruction. Same is the case with MAR. The difference between PC and MAR exists, based on their individual purpose.During the fetch stage of Instruction Cycle, the next instruction is actually read in the following way:
1: The PC has the address for the next instruction. This address is copied into MAR.
2: The Control Unit then polls for the actual instruction stored at the address that MAR points to. This is done by sending a signal to data bus to read the data at that address.
3: The actual data is sent to the CPU via data bus, which is then stored in the Memory Data Register (MDR) , also sometimes called Memory Buffer Register. The PC is incremented at this stage.
4: The content of MDR is then copied into CIR, the Current Instruction Register. After this, the decode stage starts.
Add this in the header of the Mapper:
@Mapper(.....injectionStrategy = InjectionStrategy.CONSTRUCTOR)
Documentation: https://mapstruct.org/documentation/1.5/api/org/mapstruct/InjectionStrategy.html
I found that the ClientId of the RadioButtonList is good enough.
$(document).on('click', "#RBL1_CliendId input", function() {
if($(this).prop("value") == 3){
// do something
} else {
// do something else
}
});
Same issue 5 years down the line and not even AI can solve this. Anyway I used this work around for me.
# Some GDAL configurations for GIS support
# os.environ['GDAL_DATA'] = "C:\\OSGeo4W\\share\\epsg_csv"
os.environ['PROJ_LIB'] = "C:\\OSGeo4W\\share\\proj"
os.environ['GEOS_LIBRARY_PATH'] = "C:\\OSGeo4W\\bin\\geos.dll"
In chrome, after trusting certificate, needed to run chrome in incognito as the old certs were cached.
I have the same question, I fully uninstalled the vscode using control panel, but the problem remained.
There is no suggestions when writing html code and when right click on html file it shows option of "open with..." when i click on that, it just shows a plain text editor, please provide a fix
Thanks to @DavidMaze i simply used queue.put_nowait()
as i run on the same thread.
In hindsight :
So by using put_nowait() I handled QueueFull exception by logging/counting/dropping, which makes more sense when the user has requested a bound queue.
I also faced this issue, and I tried several ways but didn't solved. Then I tried the same thing using aggregate, then it works perfectly, so maybe this is a bug from mongoose referencing. The low level aggregation pipeline does it correctly, so its some internal issue I think.
concerning the Filter message about product not having enough stock accounting for what's already in the cart.
How can we use this code to insert a variable and get the product name in the message ? I'd like to get : "You are currently trying to order "Product name", You cannot add that amount to the cart — we have %1$s in stock and you already have %2$s in your cart."
Thanks
If you're struggling to scrape Pandora Jewellery Stores or just looking for a better alternative with trendy and affordable options, I highly recommend checking out this amazing <a href="https://trendhuts.in" target="_blank">jewellery</a> collection.
TrendHuts offers a wide variety of artificial jewellery that blends traditional styles with a modern twist — perfect for gifting, festivals, or everyday wear. Unlike big brands, their site is easy to browse, and the pricing is much more accessible.
🔗 Explore more here: <a href="https://trendhuts.in" target="_blank">https://trendhuts.in</a>
IN DRF view, if you mentioned string path for renderer_classes then it'll cause this issue because drf view renderer_classes accept as as python class only.
from rest_framework.views import APIView
class TestView(APIView)
renderer_classes = [JSONRenderer]
from datetime import datetime, timezone
def convert_iso8601_to_epoch(ts):
dt = datetime.fromisoformat(ts)
# Convert to UTC timestamp (epoch seconds)
return dt.timestamp()
ts = '2012-09-30T15:31:50.262-08:00'
epoch time = convert_iso8601_to_epoch(ts)
print(epoch_time)
Currently i am getting the following error when using oracle db.
Hibernate: call next value for tutorial_id_seq
SQL Error: 6576, SQLState: 65000
ORA-06576: not a valid function or procedure name
The Sequence is already in the db. Hibernate is erroring out when calling next value from the sequence.
mysql workbench > Edit > Preferences > SQL Editor > MySQL Session
DBMS connection read timeout interval (in seconds): default value is 30 sec. PLS modify to 100 sec, then reconnect your mysql server
Python
Gaging
abs
Pyton_((peont_org
I am 6 years_(enter)
Password correct
List:
☑number
☑with color
☑with face
Save python print✅
Hi you can achieve this by creating a CustomIdGenerator annotation.
You can take a reference from my personal project regarding custom annotations...
Reference link Custom Annotation (customerdata)
The problem was that I was passing the wrong variable `$resource_group` instead of `$rg_name`. I was confused as the az was giving me a message about the API, which doesn't make any sense.
As this still does not work today (2025), and if still someone might have a similar issue, the perfect solution is to ask any chatbot to translate the text to Serbian - Latin.
From my experience, Google's Gemini is doing the best translations.
When compiling Debian for the PX30, some dependency libraries will be downloaded. If those libraries have been updated while you’re using an older version of the source code, the build might fail. In such cases, you may need to try using older versions of the libraries.
I had the same problem and increase stack_size for task, which calls vsnprintf() is helps
Try adding this class to your utils:
import android.app.Activity;
import android.graphics.Rect;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewTreeObserver;
import android.content.Context;
import android.view.inputmethod.InputMethodManager;
import java.util.HashMap;
/**
* Based on the following Stackoverflow answer:
* http://stackoverflow.com/questions/2150078/how-to-check-visibility-of-software-keyboard-in-android
*/
@SuppressWarnings("WeakerAccess")
public class KeyboardUtils implements ViewTreeObserver.OnGlobalLayoutListener
{
private final static int MAGIC_NUMBER = 200;
private SoftKeyboardToggleListener mCallback;
private View mRootView;
private Boolean prevValue = null;
private float mScreenDensity;
private static HashMap<SoftKeyboardToggleListener, KeyboardUtils> sListenerMap = new HashMap<>();
public interface SoftKeyboardToggleListener
{
void onToggleSoftKeyboard(boolean isVisible);
}
@Override
public void onGlobalLayout()
{
Rect r = new Rect();
mRootView.getWindowVisibleDisplayFrame(r);
int heightDiff = mRootView.getRootView().getHeight() - (r.bottom - r.top);
float dp = heightDiff/ mScreenDensity;
boolean isVisible = dp > MAGIC_NUMBER;
if (mCallback != null && (prevValue == null || isVisible != prevValue)) {
prevValue = isVisible;
mCallback.onToggleSoftKeyboard(isVisible);
}
}
/**
* Add a new keyboard listener
* @param act calling activity
* @param listener callback
*/
public static void addKeyboardToggleListener(Activity act, SoftKeyboardToggleListener listener)
{
removeKeyboardToggleListener(listener);
sListenerMap.put(listener, new KeyboardUtils(act, listener));
}
/**
* Remove a registered listener
* @param listener {@link SoftKeyboardToggleListener}
*/
public static void removeKeyboardToggleListener(SoftKeyboardToggleListener listener)
{
if(sListenerMap.containsKey(listener))
{
KeyboardUtils k = sListenerMap.get(listener);
k.removeListener();
sListenerMap.remove(listener);
}
}
/**
* Remove all registered keyboard listeners
*/
public static void removeAllKeyboardToggleListeners()
{
for(SoftKeyboardToggleListener l : sListenerMap.keySet())
sListenerMap.get(l).removeListener();
sListenerMap.clear();
}
/**
* Manually toggle soft keyboard visibility
* @param context calling context
*/
public static void toggleKeyboardVisibility(Context context)
{
InputMethodManager inputMethodManager = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE);
if(inputMethodManager != null)
inputMethodManager.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0);
}
/**
* Force closes the soft keyboard
* @param activeView the view with the keyboard focus
*/
public static void forceCloseKeyboard(View activeView)
{
InputMethodManager inputMethodManager = (InputMethodManager) activeView.getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
if(inputMethodManager != null)
inputMethodManager.hideSoftInputFromWindow(activeView.getWindowToken(), 0);
}
private void removeListener()
{
mCallback = null;
mRootView.getViewTreeObserver().removeOnGlobalLayoutListener(this);
}
private KeyboardUtils(Activity act, SoftKeyboardToggleListener listener)
{
mCallback = listener;
mRootView = ((ViewGroup) act.findViewById(android.R.id.content)).getChildAt(0);
mRootView.getViewTreeObserver().addOnGlobalLayoutListener(this);
mScreenDensity = act.getResources().getDisplayMetrics().density;
}
}
Use like this:
KeyboardUtils.addKeyboardToggleListener(requireActivity(), isVisible -> {
if (isVisible) {
// do something
}
});
To be clear, Chronicle 4.x and above supports concurrent writers to the same queue.
I don't know why, but was able to resolve this issue by moving the mainwindow.ui
file to the same directory with the source files. So the structure will be the following:
MyProject
CMakeLists.txt
include
mainwindow.h
src
mainwindow.cpp
main.cpp
mainwindow.ui
Popper Component allows you to scroll the website if it is open , but you can't do that in popover Component , it is by default written that way.
You can submit App Actions for production using this link: contact
Select App Actions option
Fill-up all required fields
Select 'App Action review appeal' from the drop-down option of 'How can we help you' section
Note: It will take some days to completely review your submitted App Actions also your app should also live on production.
I think you need to have internet permission. Enabled in android manifest,
Also make sure your using https. If your api url is http then follow this steps
https://medium.com/mindorks/my-network-requests-are-not-working-in-android-pie-7c7a31e33330
UPDATE: I did everything correctly. I need to fetch the token this way
@GetMapping("/profile")
public Map<String, Object> profile(OAuth2AuthenticationToken auth,
@RegisteredOAuth2AuthorizedClient("cognito")
OAuth2AuthorizedClient client) {
OidcIdToken idToken = ((OidcUser) auth.getPrincipal()).getIdToken();
String sector = idToken.getClaimAsString("custom:sector");
String idJwt = idToken.getTokenValue();
String accessJwt = client.getAccessToken().getTokenValue();
return Map.of("sector", sector,
"idToken", idJwt,
"accessToken", accessJwt);
}
How to install uv when I already need an virtual environment to install it?
With the standalone installer, or any other method - pip, cargo, docker or just by downloading the binary. All is described in the documentation, see https://docs.astral.sh/uv/getting-started/installation/ .
Isn't this a chicken-egg-problem?
No. uv
is written in rust, it doesn't require any virtual env or python.
How do you do it?
I just do pip install --user uv
Check the Google Assistant account you are using on device, sometimes if you're using more then 1 google account on same device it consider the default account so you have to select that developer account manually. You can also check if your shortcut is available for your device by open Google Assistant settings and search for 'Shortcuts' section and you'll find your App there and after that you can even create a short keyword to use your OPEN_APP_FEATURE like "Hey Google, Emergency"
I found a solution myself now. So becuase the vTextureCoord seemed to be messed up, I decided to bring up another locical location and also pass it to the fragment shader. Not it seems to work as expected:
const vertex = `
in vec2 aPosition;
out vec2 vTextureCoord;
out vec2 vLogicPosition;
uniform vec4 uInputSize;
uniform vec4 uOutputFrame;
uniform vec4 uOutputTexture;
vec4 filterVertexPosition( void )
{
vec2 position = aPosition * uOutputFrame.zw + uOutputFrame.xy;
position.x = position.x * (2.0 / uOutputTexture.x) - 1.0;
position.y = position.y * (2.0*uOutputTexture.z / uOutputTexture.y) - uOutputTexture.z;
return vec4(position, 0.0, 1.0);
}
vec2 filterTextureCoord( void )
{
return aPosition * (uOutputFrame.zw * uInputSize.zw);
}
void main(void)
{
gl_Position = filterVertexPosition();
vTextureCoord = filterTextureCoord();
vLogicPosition = aPosition;
}
`
Thank for ypur superusfull answer!!! I have donwloaded from maven repozitory jars files for Spark 3.5.6. Spark 3.5.6 is built on hadoop 3.3.4 too. Thanks a lot!
The problem is the memusg file in the ViewBS package. Simply install it from here https://github.com/jhclark/memusg, remove the original ./memusg provided with ViewBS from the PATH and you are ready to go.
In my case it was due to setting a wrong API KEY. make sure you have created one
But now i have another problem:
const loginUser = async (username: string, password: string) => {
useLogin(username, password)
.then((res) => {
if (res) {
// process res
}
})
.catch((/*e*/) => toast.warning("Server error occured"));
};
Property 'then' does not exist on type 'UseQueryResult<unknown, Error>'. Property 'then' does not exist on type 'QueryObserverRefetchErrorResult<unknown, Error>'.
Can you please tell me what's the problem here ?
change the scroll physics
physics: BouncingScrollPhysics(),
to and that should do the job.
Open project level Gradle and upgrade the kotlin version to '1.9.21' or any above version. Also Clean Project and rebuild.
I faced the same problem. This issue is also being raised here. I downgraded my vscode to 1.100.2 and remote-ssh to 0.117.0. No issues now.
I fix this problem with updating my terminal :
https://apps.microsoft.com/detail/9n0dx20hk701
Hope it help
I will soon share my code with you since I just submitted it. As a recommendation, try avoiding huge chunks of code like naming to variables too long or using this line " a = a + 1; " instead use a++ or a += 1. And yes have you done update50 on the terminal?
1. try deleting your build folder in Xcode, with the shortcut CMD + SHIFT + K
2. remove the app from your phone
3. restart your iPhone
4. rebuild and run
5. check whether WeatherKit is working properly from the Apple side (https://developer.apple.com/system-status/)