how i can enable an specific css code for visitors and an specific user role
for example thsi code:
input[type=radio] {
border: 1px solid !important;
}
New and Fresh Private + Public Proxies Lists Everyday!
Get and Download New Proxies from NewProxyLists.com
how i can enable an specific css code for visitors and an specific user role
for example thsi code:
input[type=radio] {
border: 1px solid !important;
}
I wrote a script to manage my Particle System emission. The starting lifespan is set to infinite so that the particle never dies until it reaches a specific collider. I didn’t find any method to destroy a specific particle in the Unity Manual.
How can I do this?
Here’s the code (updated to show the partial fix)
using UnityEngine;
using System.Collections.Generic;
public class PlayerDamage : MonoBehaviour
{
private ParticleSystem ps;
public List<ParticleCollisionEvent> collisionEvents;
public int attackValue = 1;
//
(Range(0.0f, 100f))
public int maxParticles;
public float particleLife;
public bool neverDies;
public float particleSpeed = 8.0F;
void Start()
{
ps = GetComponent<ParticleSystem>();
collisionEvents = new List<ParticleCollisionEvent>();
//
var collision = ps.collision;
collision.enabled = true;
collision.type = ParticleSystemCollisionType.World;
collision.mode = ParticleSystemCollisionMode.Collision3D;
}
void OnParticleCollision(GameObject other)
{
int numCollisionEvents = ps.GetCollisionEvents(other, collisionEvents);
Rigidbody rb = other.GetComponent<Rigidbody>();
int i = 0;
while (i < numCollisionEvents)
{
if (rb.CompareTag("Enemy"))
{
BaseHealth baseHealth = other.GetComponent<BaseHealth>();
if (baseHealth != null)
{
Vector3 pos = collisionEvents(i).intersection;
Vector3 force = collisionEvents(i).velocity;// * 10;
rb.AddForce(force);
baseHealth.TakeDamage(attackValue);
}
}
i++;
}
}
void Update()
{
var collision = ps.collision;
collision.maxKillSpeed = particleSpeed;
Debug.Log("Particles Alive Count: " + GetAliveParticles());
ps.Emit(maxParticles);
var main = ps.main;
main.maxParticles = Mathf.RoundToInt(maxParticles);
main.startLifetime = particleLife;
if (neverDies)
{
particleLife = float.PositiveInfinity;
}
else
{
particleLife = 5f;
}
}
int GetAliveParticles()
{
ParticleSystem.Particle() particles = new ParticleSystem.Particle(ps.particleCount);
return ps.GetParticles(particles);
}
}
Currently I have an html select tag that is populated by looping through a geoJson file (decoded using using PHP). The select option’s text is the country name and the value is it’s iso_a3 code.
When a country is selected and the button is click I’d like to load the country specific borders. Currently I’m only able to do this manually by using if/else if e.g:
$('#btnRun').click(function() {
let name = $('#selCountry').val();
$.ajax({
url: "geoJson.php",
type: 'POST',
dataType: 'json',
success: function(result) {
if (map.hasLayer(border)) {
map.removeLayer(border);
}
if (name === "CAN") {
border = L.geoJSON(result.data.border.features(1)).addTo(map);
} else if (name === "BHS") {
border = L.geoJSON(result.data.border.features(0)).addTo(map);
} else if (name === "GRL") {
border = L.geoJSON(result.data.border.features(4)).addTo(map);
}
map.fitBounds(border.getBounds());
I’m sure this is a terrible way to do this (will need to do this for 175 countries in the file). How can I create some kind of loop that would match that option’s value (iso_a3 code) to the appropriate array to load the correct border? Or other better solutions?
my html:
<nav>
<h1>Choose a country:</h1>
<select name="sel-country" id="selCountry"></select>
<button id="btnRun" data-modal-target="#modal">Run</button>
</nav>
This code populates the options:
$.ajax({
url: "geoJson.php",
type: 'POST',
dataType: "json",
success: function(result) {
console.log(result);
for (var i=0; i<result.data.border.features.length; i++) {
$('#selCountry').append($('<option>', {
value: result.data.border.features(i).properties.iso_a3,
text: result.data.border.features(i).properties.name,
}));
}
}
});
There is a REST endpoint to remove user permissions from list item.
Use this endpoint:
<siteUrl>/_api/web/lists/getbytitle('<listName>')/items(<ID>)/roleassignments/removeroleassignment(principalid=<userID>,roleDefId=1073741827)
Replace <userID>
with the actual user ID.
Microsoft documentation: Users, groups, and roles REST API reference
I am facing this strange issue with Google Chrome. When I use google chrome to open certain web pages, I see a blurry blue page that cannot be fixed (see the following screenshot). It sometimes exist for part of a page, or certain tabs of a website.
Other web browsers are working fine. I tried to restart and re-install chrome. It didn’t work. I am using mac, with intel chip. Would be glad to know what can be the potential cause.
I would like to have Android setup with 1 primary and 2 secondary hardware displays. Wondering if it possible at all? I know you can have primary and secondary screens according to the documentation, and Android have Display Manager supporting multiple displays. But wondering if 3 total will work
Let’s say I have a number of dates and whether they occupy full or half a day…
DATE | WHAT | HALF?
...
2021-4-1 | Something Something | false
2021-4-2 | Something Something | false
2021-4-5 | Something Something | false
2021-4-19| Something Something | true
2021-5-13| Something Something | false
2021-5-24| Something Something | false
2021-9-13| Something Something | true
...
I now want for each month the amount of half-days occupied in that list.
(e.g. for April
that should be 1
in the examples above, for May
that should be 0
)
I.e. in pseudocode, I’m looking for something like
=COUNTIF(A8:A, `MOTH of row = MONTH(E2)` AND `half of row = true`)
where E2
, in this case, is e.g. January
stored as a date
and A8:A
contains the dates of the above table (i.e. B8:B
contains the WHAT
and C8:C
contains the HALF?
)
i have a rooted and factory deleted Galaxy S6 edge plus, from which i want to extract/recover specific files(with specific extensions).
All the “common” software only searches for documents, pictures, messages, contacts etc.
The problem is that i have used a media hider software HD SMTH/Hide something
this saves the files in a .pg directory(i dont know here) and also changes the extension into .pg or something similiar(check link).
Can someone help me get my nuclear photos and videos back even though i have done a factory reset? any help would be much appreciated <3
I am currently using a WordPress plugin (Pagerestrict plugin which references URLS based on Page ID/Slugs)to restrict certain pages to logged in users only. This plugin works fine with standard wordpress URL structure but the issue I have is some of my pages which are directly linked to some plugin functionality have http://mywebsite.com/wp-content/plugins/purchase.php instead of a standard http://mywebsite.com/wp-content/plugins/purchase/ wordpress url structure. So what i tried in cases like this is to manually add the functionality below which didn’t work
function my_page_template_redirect() {
$url_path = preg_replace('/?.*/', '', $_SERVER('REQUEST_URI'));
if( strpos($url_path, '/wp-content/plugins/purchase.php/') !== 0 && ! is_user_logged_in() )
{
wp_redirect( wp_login_url() );
die;
}
}
add_action( 'template_redirect', 'my_page_template_redirect' );
i also saw this https://wpexplorer-themes.com/total/snippets/restrict-content-access-user/ article which recommended something similar to what i was looking for but the only twist here is it matches page conditions with $page_id instead of the URL and since my URL (refer above) which is directly linked to plugin page is not generated via wp pages or posts it has no IDs or slugs. Is there a way to workaround this? Will appreciate some recommendations.